Expr: don't pass reference to pointer to check_and_promote*()

The function never modifies the pointer value.

check_and_promote_expr() is left untouched because it really does
modify the pointer.
This commit is contained in:
Max Kellermann 2020-02-25 20:44:43 +01:00
parent 3ccda03a54
commit 0520d715c3
2 changed files with 6 additions and 6 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();