mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
Merge branch 'topic/timw/algorithms'
* topic/timw/algorithms: Remove List::append deprecation Mark List::append/insert deprecated in favor of push_back/push_front for consistency with Queue Mark List::sort as deprecated, remove List::sortedinsert Change container iterators to just use pointers directly into the container elements
This commit is contained in:
commit
19dc0f8be9
43 changed files with 263 additions and 363 deletions
12
src/Expr.cc
12
src/Expr.cc
|
@ -3039,7 +3039,7 @@ RecordConstructorExpr::RecordConstructorExpr(ListExpr* constructor_list)
|
|||
FieldAssignExpr* field = (FieldAssignExpr*) e;
|
||||
BroType* field_type = field->Type()->Ref();
|
||||
char* field_name = copy_string(field->FieldName());
|
||||
record_types->append(new TypeDecl(field_type, field_name));
|
||||
record_types->push_back(new TypeDecl(field_type, field_name));
|
||||
}
|
||||
|
||||
SetType(new RecordType(record_types));
|
||||
|
@ -4418,7 +4418,7 @@ ListExpr::~ListExpr()
|
|||
|
||||
void ListExpr::Append(Expr* e)
|
||||
{
|
||||
exprs.append(e);
|
||||
exprs.push_back(e);
|
||||
((TypeList*) type)->Append(e->Type()->Ref());
|
||||
}
|
||||
|
||||
|
@ -4482,7 +4482,7 @@ BroType* ListExpr::InitType() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
types->append(td);
|
||||
types->push_back(td);
|
||||
}
|
||||
|
||||
|
||||
|
@ -5061,11 +5061,11 @@ int check_and_promote_args(ListExpr*& args, RecordType* types)
|
|||
return 0;
|
||||
}
|
||||
|
||||
def_elements.insert(def_attr->AttrExpr());
|
||||
def_elements.push_front(def_attr->AttrExpr());
|
||||
}
|
||||
|
||||
for ( const auto& elem : def_elements )
|
||||
el.append(elem->Ref());
|
||||
el.push_back(elem->Ref());
|
||||
}
|
||||
|
||||
TypeList* tl = new TypeList();
|
||||
|
@ -5116,7 +5116,7 @@ val_list* eval_list(Frame* f, const ListExpr* l)
|
|||
success = false;
|
||||
break;
|
||||
}
|
||||
v->append(ev);
|
||||
v->push_back(ev);
|
||||
}
|
||||
|
||||
if ( ! success )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue