mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Avoid a redundant set operation in ProfileFuncs::MergeInProfile()
This commit is contained in:
parent
5ffe25fca8
commit
d57848828e
1 changed files with 3 additions and 3 deletions
|
@ -458,10 +458,10 @@ void ProfileFuncs::MergeInProfile(ProfileFunc* pf)
|
||||||
|
|
||||||
for ( auto& g : pf->Globals() )
|
for ( auto& g : pf->Globals() )
|
||||||
{
|
{
|
||||||
if ( globals.count(g) > 0 )
|
auto [it, inserted] = globals.emplace(g);
|
||||||
continue;
|
|
||||||
|
|
||||||
globals.insert(g);
|
if ( ! inserted )
|
||||||
|
continue;
|
||||||
|
|
||||||
auto& v = g->GetVal();
|
auto& v = g->GetVal();
|
||||||
if ( v )
|
if ( v )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue