From b4b7126e19e29cf3219612bfae7c8e677373a053 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 3 Sep 2022 11:12:18 +0200 Subject: [PATCH] :art: clean cretae_tmpl --- src/parse/func_resolve_tmpl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parse/func_resolve_tmpl.c b/src/parse/func_resolve_tmpl.c index 010ef247..21ecaa49 100644 --- a/src/parse/func_resolve_tmpl.c +++ b/src/parse/func_resolve_tmpl.c @@ -102,10 +102,10 @@ ANN static Func create_tmpl(const Env env, struct ResolverArgs *ra, fdef->vt_index = i; if(is_spread_tmpl(value->d.func_ref->def->base->tmpl)) { Arg_List args = fdef->base->args ?: new_mp_vector(env->gwion->mp, Arg, 0); - for(uint32_t i = 0; i < ra->types->len; i++) { + for(uint32_t idx = 0; idx < ra->types->len; idx++) { char c[256]; - sprintf(c, "arg%u", i); - Type_Decl *td = *mp_vector_at(ra->types, Type_Decl*, i); + sprintf(c, "arg%u", idx); + Type_Decl *td = *mp_vector_at(ra->types, Type_Decl*, idx); Arg arg = { .td = cpy_type_decl(env->gwion->mp, td), .var_decl = {.xid = insert_symbol(c), /*.value = v*/ }}; mp_vector_add(env->gwion->mp, &args, Arg, arg); } -- 2.43.0