diff options
author | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-20 18:42:58 -0400 |
---|---|---|
committer | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-20 18:42:58 -0400 |
commit | 381c9c8870fad4c544f29deec22ba4be3549a731 (patch) | |
tree | f5f26e2dd380910b0ddd26e3d885d6bf56d40181 /src/timers.cpp | |
parent | 2528dc80bd1b3e6b2c09db23eb51659e30128110 (diff) |
The first of a few "CBX OCDing over code style" commits, focusing on include/* and src/* but not src/core/* or src/modules/*.
Diffstat (limited to 'src/timers.cpp')
-rw-r--r-- | src/timers.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/timers.cpp b/src/timers.cpp index 718cbe82f..e4a2ef04b 100644 --- a/src/timers.cpp +++ b/src/timers.cpp @@ -5,9 +5,7 @@ * * Please read COPYING and README for furhter details. * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * + * Based on the original code of Services by Andy Church. */ #include "services.h" @@ -91,11 +89,9 @@ void TimerManager::AddTimer(Timer *T) void TimerManager::DelTimer(Timer *T) { std::vector<Timer *>::iterator i = std::find(Timers.begin(), Timers.end(), T); - + if (i != Timers.end()) - { Timers.erase(i); - } } /** Tick all pending timers @@ -108,7 +104,7 @@ void TimerManager::TickTimers(time_t ctime) Timer *t = Timers.front(); t->Tick(ctime); - + if (t->GetRepeat()) { t->SetTimer(ctime + t->GetSecs()); |