mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
Convert uses of loop_over_list to ranged-for loops
This commit is contained in:
parent
bf70dad395
commit
e51f02737b
24 changed files with 292 additions and 345 deletions
|
@ -728,11 +728,11 @@ void Analyzer::CancelTimers()
|
|||
// traversing. Thus, we first make a copy of the list which we then
|
||||
// iterate through.
|
||||
timer_list tmp(timers.length());
|
||||
loop_over_list(timers, j)
|
||||
tmp.append(timers[j]);
|
||||
std::copy(timers.begin(), timers.end(), back_inserter(tmp));
|
||||
|
||||
loop_over_list(tmp, i)
|
||||
Conn()->GetTimerMgr()->Cancel(tmp[i]);
|
||||
// TODO: could be a for_each
|
||||
for ( auto timer : tmp )
|
||||
Conn()->GetTimerMgr()->Cancel(timer);
|
||||
|
||||
timers_canceled = 1;
|
||||
timers.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue