mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Use emplace_back over push_back where appropriate
This commit is contained in:
parent
0d78eb1933
commit
64b78f6fb9
28 changed files with 86 additions and 86 deletions
|
@ -2085,7 +2085,7 @@ void WhenInfo::BuildProfile()
|
|||
if ( ! is_present )
|
||||
{
|
||||
IDPtr wl_ptr = {NewRef{}, const_cast<ID*>(wl)};
|
||||
cl->emplace_back(FuncType::Capture{wl_ptr, false});
|
||||
cl->emplace_back(wl_ptr, false);
|
||||
}
|
||||
|
||||
// In addition, don't treat them as external locals that
|
||||
|
@ -2098,7 +2098,7 @@ void WhenInfo::BuildProfile()
|
|||
// We need IDPtr versions of the locals so we can manipulate
|
||||
// them during script optimization.
|
||||
auto non_const_w = const_cast<ID*>(w);
|
||||
when_expr_locals.push_back({NewRef{}, non_const_w});
|
||||
when_expr_locals.emplace_back(NewRef{}, non_const_w);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue