mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Remove MutableVal class.
This commit is contained in:
parent
062a1ee6b3
commit
7bd738865c
11 changed files with 39 additions and 55 deletions
|
@ -385,7 +385,7 @@ void Trigger::Register(ID* id)
|
|||
notifier::registry.Register(id, this);
|
||||
|
||||
Ref(id);
|
||||
objs.push_back(id);
|
||||
objs.push_back({id, id});
|
||||
}
|
||||
|
||||
void Trigger::Register(Val* val)
|
||||
|
@ -397,13 +397,18 @@ void Trigger::Register(Val* val)
|
|||
notifier::registry.Register(val->Modifiable(), this);
|
||||
|
||||
Ref(val);
|
||||
objs.push_back(val);
|
||||
objs.emplace_back(val, val->Modifiable());
|
||||
}
|
||||
|
||||
void Trigger::UnregisterAll()
|
||||
{
|
||||
DBG_LOG(DBG_NOTIFIERS, "%s: unregistering all", Name());
|
||||
|
||||
for ( auto o : objs )
|
||||
Unref(o); // this will unregister with the registry as well
|
||||
{
|
||||
notifier::registry.Unregister(o.second, this);
|
||||
Unref(o.first);
|
||||
}
|
||||
|
||||
objs.clear();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue