mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +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
|
@ -13,10 +13,9 @@
|
|||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
CompositeHash::CompositeHash(TypeList* composite_type)
|
||||
CompositeHash::CompositeHash(IntrusivePtr<TypeList> composite_type)
|
||||
:type(std::move(composite_type))
|
||||
{
|
||||
type = composite_type;
|
||||
Ref(type);
|
||||
singleton_tag = TYPE_INTERNAL_ERROR;
|
||||
|
||||
// If the only element is a record, don't treat it as a
|
||||
|
@ -66,7 +65,6 @@ CompositeHash::CompositeHash(TypeList* composite_type)
|
|||
|
||||
CompositeHash::~CompositeHash()
|
||||
{
|
||||
Unref(type);
|
||||
delete [] key;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue