mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58: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
|
@ -502,10 +502,7 @@ void Reporter::DoLog(const char* prefix, EventHandlerPtr event, FILE* out,
|
|||
vl.append(conn->BuildConnVal());
|
||||
|
||||
if ( addl )
|
||||
{
|
||||
loop_over_list(*addl, i)
|
||||
vl.append((*addl)[i]);
|
||||
}
|
||||
std::copy(addl->begin(), addl->end(), std::back_inserter(vl));
|
||||
|
||||
if ( conn )
|
||||
conn->ConnectionEventFast(event, 0, std::move(vl));
|
||||
|
@ -516,8 +513,8 @@ void Reporter::DoLog(const char* prefix, EventHandlerPtr event, FILE* out,
|
|||
{
|
||||
if ( addl )
|
||||
{
|
||||
loop_over_list(*addl, i)
|
||||
Unref((*addl)[i]);
|
||||
for ( const auto& av : *addl )
|
||||
Unref(av);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue