mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Avoid redundant map/set searches in various ProfileFunc methods
This commit is contained in:
parent
ab1f1f8360
commit
ccd27a3dfa
2 changed files with 32 additions and 21 deletions
|
@ -316,8 +316,9 @@ public:
|
|||
// the parameter (which might be the parameter itself).
|
||||
const Type* TypeRep(const Type* orig)
|
||||
{
|
||||
ASSERT(type_to_rep.count(orig) > 0);
|
||||
return type_to_rep[orig];
|
||||
auto it = type_to_rep.find(orig);
|
||||
ASSERT(it != type_to_rep.end());
|
||||
return it->second;
|
||||
}
|
||||
|
||||
// Returns the hash associated with the given type, computing it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue