mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Change Attributes to store std:vector<IntrusivePtr<Attr>>
This also changes the return type of Attributes::Attrs() from attr_list*
This commit is contained in:
parent
007533295a
commit
102e58b80b
5 changed files with 59 additions and 54 deletions
11
src/Expr.cc
11
src/Expr.cc
|
@ -2170,9 +2170,14 @@ bool AssignExpr::TypeCheck(attr_list* attrs)
|
|||
|
||||
if ( sce->Attrs() )
|
||||
{
|
||||
attr_list* a = sce->Attrs()->Attrs();
|
||||
attrs = new attr_list(a->length());
|
||||
std::copy(a->begin(), a->end(), std::back_inserter(*attrs));
|
||||
const auto& a = sce->Attrs()->Attrs();
|
||||
attr_copy = new attr_list(a.size());
|
||||
|
||||
for ( const auto& attr : a )
|
||||
{
|
||||
::Ref(attr.get());
|
||||
attrs->push_back(attr.get());
|
||||
}
|
||||
}
|
||||
|
||||
int errors_before = reporter->Errors();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue