1
0
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:
Sadie Powell
2024-03-14 23:19:32 +00:00
parent 4e9d183523
commit 13a556df89
2 changed files with 8 additions and 11 deletions
+7 -10
View File
@@ -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);
}