mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
IntrusivePtr: replace the "add_ref" parameter with tag structs
Using a runtime parameter is obscure and error-prone. Avoiding error-prone code and getting reference counting right is the whole point of this class.
This commit is contained in:
parent
7c0863dccf
commit
31b3a56740
7 changed files with 41 additions and 15 deletions
|
@ -1984,7 +1984,7 @@ void TableVal::CallChangeFunc(const Val* index, Val* old_value, OnChangeType tpe
|
|||
|
||||
try
|
||||
{
|
||||
IntrusivePtr<Val> thefunc{change_func->Eval(nullptr), false};
|
||||
IntrusivePtr<Val> thefunc{AdoptRef{}, change_func->Eval(nullptr)};
|
||||
|
||||
if ( ! thefunc )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue