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
11
src/util.cc
11
src/util.cc
|
@ -1001,11 +1001,12 @@ string bro_prefixes()
|
|||
{
|
||||
string rval;
|
||||
|
||||
loop_over_list(prefixes, j)
|
||||
if ( j == 0 )
|
||||
rval.append(prefixes[j]);
|
||||
else
|
||||
rval.append(":").append(prefixes[j]);
|
||||
for ( const auto& prefix : prefixes )
|
||||
{
|
||||
if ( ! rval.empty() )
|
||||
rval.append(":");
|
||||
rval.append(prefix);
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue