From a368b8f4239be9d8fb807dc72385824c9370f07d Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Wed, 2 Oct 2019 01:26:00 +0200 Subject: [PATCH] :art: Improve vec value --- src/parse/check.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/parse/check.c b/src/parse/check.c index dae10dc4..50c22a09 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -299,13 +299,10 @@ ANN static Type prim_id(const Env env, Exp_Primary* primary) { } ANN static m_bool vec_value(const Env env, Exp e) { - int count = 1; CHECK_OB(check_exp(env, e)) - do { - if(check_implicit(env, e, env->gwion->type[et_float]) < 0) - ERR_B(e->pos, _("invalid type '%s' in value #%d...\n"), e->type->name, count) - ++count; - } while((e = e->next)); + const Type t_float = env->gwion->type[et_float]; + do CHECK_BB(check_implicit(env, e, t_float)) + while((e = e->next)); return GW_OK; } -- 2.43.0