mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
Changed implementation from std::map to std::unordered_map of Val.cc
This commit is contained in:
parent
d7474e2aa2
commit
9a3855cc38
2 changed files with 4 additions and 5 deletions
|
@ -3972,11 +3972,10 @@ const PortValPtr& ValManager::Port(uint32_t port_num, TransportProto port_type)
|
|||
port_num = 0;
|
||||
}
|
||||
|
||||
std::pair key{port_num, port_type};
|
||||
if ( ports.find(key) == ports.end() )
|
||||
ports[key] = IntrusivePtr{AdoptRef{}, new PortVal(PortVal::Mask(port_num, port_type))};
|
||||
if ( ports.find(port_num) == ports.end() )
|
||||
ports[port_num] = IntrusivePtr{AdoptRef{}, new PortVal(PortVal::Mask(port_num, port_type))};
|
||||
|
||||
return ports[key];
|
||||
return ports[port_num];
|
||||
}
|
||||
|
||||
const PortValPtr& ValManager::Port(uint32_t port_num)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue