diff options
| author | gingerBill <bill@gingerbill.org> | 2018-06-03 10:30:31 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-06-03 10:30:31 +0100 |
| commit | 12b870ba6671854a3de8605f8dd8f36d1de90c6a (patch) | |
| tree | fdae9d80ef49a2cf0fcce9e84bd5a918ba614807 /src/check_expr.cpp | |
| parent | 6202fb83738027a312c88f544c121b65823313c1 (diff) | |
Use const & for Array<AstNode *> parameters
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 1576989cc..9e3486675 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -72,7 +72,7 @@ void update_expr_type (CheckerContext *c, AstNode *e, Type *ty bool check_is_terminating (AstNode *node); bool check_has_break (AstNode *stmt, bool implicit); void check_stmt (CheckerContext *c, AstNode *node, u32 flags); -void check_stmt_list (CheckerContext *c, Array<AstNode *> stmts, u32 flags); +void check_stmt_list (CheckerContext *c, Array<AstNode *> const &stmts, u32 flags); void check_init_constant (CheckerContext *c, Entity *e, Operand *operand); bool check_representable_as_constant(CheckerContext *c, ExactValue in_value, Type *type, ExactValue *out_value); bool check_procedure_type (CheckerContext *c, Type *type, AstNode *proc_type_node, Array<Operand> *operands = nullptr); @@ -107,7 +107,7 @@ void error_operand_no_value(Operand *o) { } -void check_scope_decls(CheckerContext *c, Array<AstNode *> nodes, isize reserve_size) { +void check_scope_decls(CheckerContext *c, Array<AstNode *> const &nodes, isize reserve_size) { Scope *s = c->scope; GB_ASSERT(s->package == nullptr); @@ -4100,7 +4100,7 @@ isize add_dependencies_from_unpacking(CheckerContext *c, Entity **lhs, isize lhs } -void check_unpack_arguments(CheckerContext *ctx, Entity **lhs, isize lhs_count, Array<Operand> *operands, Array<AstNode *> rhs, bool allow_ok, bool *optional_ok_ = nullptr) { +void check_unpack_arguments(CheckerContext *ctx, Entity **lhs, isize lhs_count, Array<Operand> *operands, Array<AstNode *> const &rhs, bool allow_ok, bool *optional_ok_ = nullptr) { bool optional_ok = false; isize tuple_index = 0; for_array(i, rhs) { @@ -6279,7 +6279,7 @@ void check_expr_or_type(CheckerContext *c, Operand *o, AstNode *e, Type *type_hi gbString write_expr_to_string(gbString str, AstNode *node); -gbString write_struct_fields_to_string(gbString str, Array<AstNode *> params) { +gbString write_struct_fields_to_string(gbString str, Array<AstNode *> const ¶ms) { for_array(i, params) { if (i > 0) { str = gb_string_appendc(str, ", "); |