[Scummvm-git-logs] scummvm master -> 889cadaca568fa3b68a647b46cafeefed2abe18b
digitall
dgturner at iee.org
Thu May 9 06:09:13 CEST 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
889cadaca5 BACKENDS: Fix GCC Compiler Warning in Default Timer Implementation
Commit: 889cadaca568fa3b68a647b46cafeefed2abe18b
https://github.com/scummvm/scummvm/commit/889cadaca568fa3b68a647b46cafeefed2abe18b
Author: D G Turner (digitall at scummvm.org)
Date: 2019-05-09T05:06:44+01:00
Commit Message:
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.
Changed paths:
backends/timer/default/default-timer.cpp
diff --git a/backends/timer/default/default-timer.cpp b/backends/timer/default/default-timer.cpp
index 8964d5a..19d1a0a 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() {
More information about the Scummvm-git-logs
mailing list