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.
This commit is contained in:
D G Turner 2019-05-09 05:06:44 +01:00
parent 36ae364b93
commit 889cadaca5

View file

@ -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() {