mirror of
https://github.com/anope/anope.git
synced 2026-07-06 11:33:13 +02:00
Initialize timer members with constructor initialization.
This commit is contained in:
+7
-10
@@ -12,22 +12,19 @@
|
||||
std::multimap<time_t, Timer *> TimerManager::Timers;
|
||||
|
||||
Timer::Timer(time_t time_from_now, bool repeating)
|
||||
: trigger(Anope::CurTime + std::abs(time_from_now))
|
||||
, secs(time_from_now)
|
||||
, repeat(repeating)
|
||||
{
|
||||
owner = NULL;
|
||||
trigger = Anope::CurTime + std::abs(time_from_now);
|
||||
secs = time_from_now;
|
||||
repeat = repeating;
|
||||
|
||||
TimerManager::AddTimer(this);
|
||||
}
|
||||
|
||||
Timer::Timer(Module *creator, time_t time_from_now, bool repeating)
|
||||
: owner(creator)
|
||||
, trigger(Anope::CurTime + std::abs(time_from_now))
|
||||
, secs(time_from_now)
|
||||
, repeat(repeating)
|
||||
{
|
||||
owner = creator;
|
||||
trigger = Anope::CurTime + std::abs(time_from_now);
|
||||
secs = time_from_now;
|
||||
repeat = repeating;
|
||||
|
||||
TimerManager::AddTimer(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user