From 5298e00c09ad2d6d944c0d640a51352bae49f490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Tue, 14 Jun 2016 09:25:06 +0200 Subject: [PATCH] Remove redundant callback parameter from createTimer. --- source/eventcore/driver.d | 2 +- source/eventcore/drivers/timer.d | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/eventcore/driver.d b/source/eventcore/driver.d index 18cd929..41f7a93 100644 --- a/source/eventcore/driver.d +++ b/source/eventcore/driver.d @@ -80,7 +80,7 @@ interface EventDriver { // // Timers // - TimerID createTimer(TimerCallback callback); + TimerID createTimer(); void setTimer(TimerID timer, Duration timeout, Duration repeat = Duration.zero); void stopTimer(TimerID timer); bool isTimerPending(TimerID timer); diff --git a/source/eventcore/drivers/timer.d b/source/eventcore/drivers/timer.d index f900a83..9c4239d 100644 --- a/source/eventcore/drivers/timer.d +++ b/source/eventcore/drivers/timer.d @@ -66,7 +66,7 @@ mixin template DefaultTimerImpl() { m_firedTimers.assumeSafeAppend(); } - final override TimerID createTimer(TimerCallback callback) + final override TimerID createTimer() @trusted { auto id = cast(TimerID)(m_lastTimerID + 1); TimerSlot* tm; @@ -75,7 +75,6 @@ mixin template DefaultTimerImpl() { assert(tm !is null); tm.id = id; tm.refCount = 1; - tm.callbacks ~= callback; m_timers[id] = tm; return id; }