aboutsummaryrefslogtreecommitdiff
path: root/backends/timer
diff options
context:
space:
mode:
authorD G Turner2019-05-09 05:06:44 +0100
committerD G Turner2019-05-09 05:06:44 +0100
commit889cadaca568fa3b68a647b46cafeefed2abe18b (patch)
treeb96af7298cad75ec83a190978d17277b65ce83f3 /backends/timer
parent36ae364b9326df4ec19026a44e9204da0a0381e7 (diff)
downloadscummvm-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')
-rw-r--r--backends/timer/default/default-timer.cpp3
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() {