]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Move the definition of Timer::Timer() into the source file from the header
authorAttila Molnar <attilamolnar@hush.com>
Thu, 10 Jul 2014 10:14:27 +0000 (12:14 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Thu, 10 Jul 2014 10:14:27 +0000 (12:14 +0200)
Use initialization list

include/timer.h
src/timer.cpp

index 503fa82a2f460c1aa8c8bd705d206861608f9cd1..1787da7ba1fe067ecb3b00a3661c0559fd2c4b69 100644 (file)
@@ -53,12 +53,7 @@ class CoreExport Timer
         * @param now The time now
         * @param repeating Repeat this timer every secs_from_now seconds if set to true
         */
-       Timer(unsigned int secs_from_now, time_t now, bool repeating = false)
-       {
-               trigger = now + secs_from_now;
-               secs = secs_from_now;
-               repeat = repeating;
-       }
+       Timer(unsigned int secs_from_now, time_t now, bool repeating = false);
 
        /** Default destructor, removes the timer from the timer manager
         */
index 1c8de4cb98f019be1c8e6cee9f6d840f48e5fa4f..4fee7174222340ee7604bd817f0780f3540c5a3b 100644 (file)
@@ -30,6 +30,13 @@ void Timer::SetInterval(time_t newinterval)
        ServerInstance->Timers.AddTimer(this);
 }
 
+Timer::Timer(unsigned int secs_from_now, time_t now, bool repeating)
+       : trigger(now + secs_from_now)
+       , secs(secs_from_now)
+       , repeat(repeating)
+{
+}
+
 Timer::~Timer()
 {
        ServerInstance->Timers.DelTimer(this);