mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
ID: Add AddAttr() helper
This is just a follow-up as code cleanup, but not required to be backported to 5.1.
This commit is contained in:
parent
ef920ef3f5
commit
da5fdb2072
5 changed files with 13 additions and 17 deletions
|
@ -109,11 +109,7 @@ void activate_bodies__CPP(const char* fn, const char* module, bool exported, Typ
|
|||
}
|
||||
|
||||
if ( ! fg->GetAttr(ATTR_IS_USED) )
|
||||
{
|
||||
vector<AttrPtr> used_attr;
|
||||
used_attr.emplace_back(make_intrusive<Attr>(ATTR_IS_USED));
|
||||
fg->AddAttrs(make_intrusive<Attributes>(used_attr, nullptr, false, true));
|
||||
}
|
||||
fg->AddAttr(make_intrusive<Attr>(ATTR_IS_USED));
|
||||
|
||||
auto v = fg->GetVal();
|
||||
if ( ! v )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue