mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Deprecate VectorVal::Assign methods taking raw Val*
And adapt usages to pass in to alternate method taking IntrusivePtr
This commit is contained in:
parent
2cbf36721c
commit
de1e3d7d6d
15 changed files with 77 additions and 54 deletions
|
@ -3080,18 +3080,13 @@ bool VectorVal::Assign(unsigned int index, IntrusivePtr<Val> element)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool VectorVal::Assign(unsigned int index, Val* element)
|
||||
{
|
||||
return Assign(index, {AdoptRef{}, element});
|
||||
}
|
||||
|
||||
bool VectorVal::AssignRepeat(unsigned int index, unsigned int how_many,
|
||||
Val* element)
|
||||
IntrusivePtr<Val> element)
|
||||
{
|
||||
ResizeAtLeast(index + how_many);
|
||||
|
||||
for ( unsigned int i = index; i < index + how_many; ++i )
|
||||
if ( ! Assign(i, {NewRef{}, element}) )
|
||||
if ( ! Assign(i, element) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue