Remove redundant callback parameter from createTimer.

This commit is contained in:
Sönke Ludwig 2016-06-14 09:25:06 +02:00
parent 5ec6b9a5e5
commit 5298e00c09
2 changed files with 2 additions and 3 deletions

View file

@ -80,7 +80,7 @@ interface EventDriver {
// //
// Timers // Timers
// //
TimerID createTimer(TimerCallback callback); TimerID createTimer();
void setTimer(TimerID timer, Duration timeout, Duration repeat = Duration.zero); void setTimer(TimerID timer, Duration timeout, Duration repeat = Duration.zero);
void stopTimer(TimerID timer); void stopTimer(TimerID timer);
bool isTimerPending(TimerID timer); bool isTimerPending(TimerID timer);

View file

@ -66,7 +66,7 @@ mixin template DefaultTimerImpl() {
m_firedTimers.assumeSafeAppend(); m_firedTimers.assumeSafeAppend();
} }
final override TimerID createTimer(TimerCallback callback) final override TimerID createTimer()
@trusted { @trusted {
auto id = cast(TimerID)(m_lastTimerID + 1); auto id = cast(TimerID)(m_lastTimerID + 1);
TimerSlot* tm; TimerSlot* tm;
@ -75,7 +75,6 @@ mixin template DefaultTimerImpl() {
assert(tm !is null); assert(tm !is null);
tm.id = id; tm.id = id;
tm.refCount = 1; tm.refCount = 1;
tm.callbacks ~= callback;
m_timers[id] = tm; m_timers[id] = tm;
return id; return id;
} }