mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Type: use class IntrusivePtr in TypeList
This commit is contained in:
parent
de0289125b
commit
73cea5dcad
13 changed files with 62 additions and 74 deletions
|
@ -27,8 +27,8 @@ void TopkVal::Typify(BroType* t)
|
|||
{
|
||||
assert(!hash && !type);
|
||||
type = t->Ref();
|
||||
auto tl = make_intrusive<TypeList>(t);
|
||||
tl->Append(t->Ref());
|
||||
auto tl = make_intrusive<TypeList>(IntrusivePtr{NewRef{}, t});
|
||||
tl->Append({NewRef{}, t});
|
||||
hash = new CompositeHash(std::move(tl));
|
||||
}
|
||||
|
||||
|
@ -199,8 +199,8 @@ VectorVal* TopkVal::GetTopK(int k) const // returns vector
|
|||
return 0;
|
||||
}
|
||||
|
||||
TypeList* vector_index = new TypeList(type);
|
||||
vector_index->Append(type->Ref());
|
||||
TypeList* vector_index = new TypeList({NewRef{}, type});
|
||||
vector_index->Append({NewRef{}, type});
|
||||
VectorType* v = new VectorType(vector_index);
|
||||
VectorVal* t = new VectorVal(v);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue