diff options
author | D G Turner | 2019-05-09 05:06:44 +0100 |
---|---|---|
committer | D G Turner | 2019-05-09 05:06:44 +0100 |
commit | 889cadaca568fa3b68a647b46cafeefed2abe18b (patch) | |
tree | b96af7298cad75ec83a190978d17277b65ce83f3 /backends/timer/default | |
parent | 36ae364b9326df4ec19026a44e9204da0a0381e7 (diff) | |
download | scummvm-rg350-889cadaca568fa3b68a647b46cafeefed2abe18b.tar.gz scummvm-rg350-889cadaca568fa3b68a647b46cafeefed2abe18b.tar.bz2 scummvm-rg350-889cadaca568fa3b68a647b46cafeefed2abe18b.zip |
BACKENDS: Fix GCC Compiler Warning in Default Timer Implementation
This is another instance of a warning from usage of memset on a
non-trivial data structure, but this can be removed and replaced by a
constructor.
Diffstat (limited to 'backends/timer/default')
-rw-r--r-- | backends/timer/default/default-timer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/timer/default/default-timer.cpp b/backends/timer/default/default-timer.cpp index 8964d5a7c7..19d1a0af11 100644 --- a/backends/timer/default/default-timer.cpp +++ b/backends/timer/default/default-timer.cpp @@ -35,6 +35,8 @@ struct TimerSlot { uint32 nextFireTimeMicro; // microseconds part of nextFire TimerSlot *next; + + TimerSlot() : refCon(0), interval(0), nextFireTime(0), nextFireTimeMicro(0), next(0) {} }; void insertPrioQueue(TimerSlot *head, TimerSlot *newSlot) { @@ -63,7 +65,6 @@ DefaultTimerManager::DefaultTimerManager() : _head(0) { _head = new TimerSlot(); - memset(_head, 0, sizeof(TimerSlot)); } DefaultTimerManager::~DefaultTimerManager() { |