aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-02-25 19:23:52 +0000
committergingerBill <bill@gingerbill.org>2018-02-25 19:23:52 +0000
commitd63885a495d2314a5ef76337605a9ebeefb26218 (patch)
treea47a575251d0be0020e3120e970e71ba55d3a651 /src/check_decl.cpp
parentf28a34fa99d68ce54c76272385ff9c172cc2ae59 (diff)
`array_make`
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index c37e97906..b61bce253 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -100,8 +100,7 @@ void check_init_variables(Checker *c, Entity **lhs, isize lhs_count, Array<AstNo
// NOTE(bill): If there is a bad syntax error, rhs > lhs which would mean there would need to be
// an extra allocation
- Array<Operand> operands = {};
- array_init(&operands, c->tmp_allocator, 2*lhs_count);
+ auto operands = array_make<Operand>(c->tmp_allocator, 0, 2*lhs_count);
check_unpack_arguments(c, lhs, lhs_count, &operands, inits, true);
isize rhs_count = operands.count;
@@ -758,7 +757,7 @@ void check_proc_group_decl(Checker *c, Entity *pg_entity, DeclInfo *d) {
ast_node(pg, ProcGroup, d->init_expr);
- array_init(&pge->entities, c->allocator, pg->args.count);
+ pge->entities = array_make<Entity*>(c->allocator, 0, pg->args.count);
// NOTE(bill): This must be set here to prevent cycles in checking if someone
// places the entity within itself