mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
Type: return IntrusivePtr
This commit is contained in:
parent
0a6ddfb6b5
commit
ba35ebec4c
38 changed files with 319 additions and 334 deletions
|
@ -184,11 +184,11 @@ void TopkVal::Merge(const TopkVal* value, bool doPrune)
|
|||
}
|
||||
}
|
||||
|
||||
Val* TopkVal::DoClone(CloneState* state)
|
||||
IntrusivePtr<Val> TopkVal::DoClone(CloneState* state)
|
||||
{
|
||||
auto clone = new TopkVal(size);
|
||||
auto clone = make_intrusive<TopkVal>(size);
|
||||
clone->Merge(this);
|
||||
return state->NewClone(this, clone);
|
||||
return state->NewClone(this, std::move(clone));
|
||||
}
|
||||
|
||||
VectorVal* TopkVal::GetTopK(int k) const // returns vector
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue