- Minor code style/format tweaks in merge

* 'refactor' of https://github.com/MaxKellermann/zeek:
  IntrusivePtr: overload std::swap()
  IntrusivePtr: eliminate setPtr()
  IntrusivePtr: optimize release() using std::exchange()
  Expr: remove unused default constructors and `friend` declarations
  Expr: remove useless override
  Type: don't pass reference to pointer to MatchesIndex()
  Expr: don't pass reference to pointer to check_and_promote*()
  ID: remove unused default constructor
  Scope: simplify PList access, use pop_back() and back()
  List: add method empty()
This commit is contained in:
Jon Siwek 2020-02-26 10:04:32 -08:00
commit 597407a708
10 changed files with 67 additions and 190 deletions

View file

@ -5195,7 +5195,7 @@ int check_and_promote_expr(Expr*& e, BroType* t)
return 1;
}
int check_and_promote_exprs(ListExpr*& elements, TypeList* types)
int check_and_promote_exprs(ListExpr* const elements, TypeList* types)
{
expr_list& el = elements->Exprs();
const type_list* tl = types->Types();
@ -5225,7 +5225,7 @@ int check_and_promote_exprs(ListExpr*& elements, TypeList* types)
return 1;
}
int check_and_promote_args(ListExpr*& args, RecordType* types)
int check_and_promote_args(ListExpr* const args, RecordType* types)
{
expr_list& el = args->Exprs();
int ntypes = types->NumFields();
@ -5269,7 +5269,7 @@ int check_and_promote_args(ListExpr*& args, RecordType* types)
return rval;
}
int check_and_promote_exprs_to_type(ListExpr*& elements, BroType* type)
int check_and_promote_exprs_to_type(ListExpr* const elements, BroType* type)
{
expr_list& el = elements->Exprs();