From c77ffa012f3a7d67d5e8f26644f0206b78b9008a Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Wed, 11 Nov 2020 00:16:31 +0100 Subject: [PATCH] :art: Remove goto --- src/parse/func_resolve_tmpl.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/parse/func_resolve_tmpl.c b/src/parse/func_resolve_tmpl.c index 994f4966..4f623be7 100644 --- a/src/parse/func_resolve_tmpl.c +++ b/src/parse/func_resolve_tmpl.c @@ -159,13 +159,12 @@ ANN Func find_template_match(const Env env, const Value value, const Exp_Call* e while(t && t->nspc) { Func_Def fdef = value->d.func_ref ? value->d.func_ref->def : value->type->info->func->def; const Value v = nspc_lookup_value0(t->nspc, fdef->base->xid); - if(!v) - goto next; - const Func f = _find_template_match(env, v, exp); - if(f) - return f; - next: - t = t->info->parent; + if(!v) { + const Func f = _find_template_match(env, v, exp); + if(f) + return f; + } + t = t->info->parent; } ERR_O(exp_self(exp)->pos, _("arguments do not match for template call")) } -- 2.43.0