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:
parent
36ae364b93
commit
889cadaca5
1 changed files with 2 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue