mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Misc/minor cleanup after reviewing new Broker table store code
Just some naming/style + minor memory management tweaks (avoid some copies; use move semantics).
This commit is contained in:
parent
823d4e6220
commit
b62fd71181
7 changed files with 31 additions and 20 deletions
|
@ -1517,7 +1517,7 @@ void TableVal::SetAttrs(detail::AttributesPtr a)
|
|||
auto bs = attrs->Find(zeek::detail::ATTR_BROKER_STORE);
|
||||
if ( bs && broker_store.empty() )
|
||||
{
|
||||
IntrusivePtr<Val> c = bs->GetExpr()->Eval(nullptr);
|
||||
auto c = bs->GetExpr()->Eval(nullptr);
|
||||
assert(c);
|
||||
assert(c->GetType()->Tag() == zeek::TYPE_STRING);
|
||||
broker_store = c->AsStringVal()->AsString()->CheckString();
|
||||
|
@ -2280,7 +2280,7 @@ ValPtr TableVal::Remove(const Val& index, bool broker_forward)
|
|||
if ( change_func )
|
||||
{
|
||||
// this is totally cheating around the fact that we need a Intrusive pointer.
|
||||
IntrusivePtr<Val> changefunc_val = RecreateIndex(*(k.get()));
|
||||
ValPtr changefunc_val = RecreateIndex(*(k.get()));
|
||||
CallChangeFunc(changefunc_val, va, ELEMENT_REMOVED);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue