mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
CompHash: use class IntrusivePtr for the type
field
This commit is contained in:
parent
31b3a56740
commit
53f49e0057
7 changed files with 17 additions and 22 deletions
|
@ -27,10 +27,9 @@ void TopkVal::Typify(BroType* t)
|
|||
{
|
||||
assert(!hash && !type);
|
||||
type = t->Ref();
|
||||
TypeList* tl = new TypeList(t);
|
||||
auto tl = make_intrusive<TypeList>(t);
|
||||
tl->Append(t->Ref());
|
||||
hash = new CompositeHash(tl);
|
||||
Unref(tl);
|
||||
hash = new CompositeHash(std::move(tl));
|
||||
}
|
||||
|
||||
HashKey* TopkVal::GetHash(Val* v) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue