mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Remove loop_over_queue (as an example for later removing loop_over_list)
This commit is contained in:
parent
a4e2cfa2be
commit
bf70dad395
3 changed files with 4 additions and 12 deletions
|
@ -378,10 +378,9 @@ vector<ParseLocationRec> parse_location_string(const string& s)
|
|||
}
|
||||
|
||||
StmtLocMapping* hit = 0;
|
||||
loop_over_queue(*map, i)
|
||||
for ( const auto entry : *map )
|
||||
{
|
||||
StmtLocMapping* entry = (*map)[i];
|
||||
plr.filename = (*map)[i]->Loc().filename;
|
||||
plr.filename = entry->Loc().filename;
|
||||
|
||||
if ( entry->Loc().first_line > plr.line )
|
||||
break;
|
||||
|
@ -389,7 +388,7 @@ vector<ParseLocationRec> parse_location_string(const string& s)
|
|||
if ( plr.line >= entry->Loc().first_line &&
|
||||
plr.line <= entry->Loc().last_line )
|
||||
{
|
||||
hit = (*map)[i];
|
||||
hit = entry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue