From: Wolfgang Bumiller Date: Tue, 12 Nov 2013 15:28:11 +0000 (+0100) Subject: bit more concise X-Git-Tag: xonotic-v0.8.0~94 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f43106017fdb66553e1f507d3330c4490f195e9e;p=xonotic%2Fgmqcc.git bit more concise --- diff --git a/fold.c b/fold.c index bd06737..48ae6f1 100644 --- a/fold.c +++ b/fold.c @@ -537,11 +537,10 @@ static GMQCC_INLINE ast_expression *fold_op_xor(fold_t *fold, ast_value *a, ast_ if (fold_can_2(a, b)) return fold_constgen_float(fold, (qcfloat_t)(((qcint_t)fold_immvalue_float(a)) ^ ((qcint_t)fold_immvalue_float(b)))); } else { - if (isvector(b)) { - if (fold_can_2(a, b)) + if (fold_can_2(a, b)) { + if (isvector(b)) return fold_constgen_vector(fold, vec3_xor(fold_immvalue_vector(a), fold_immvalue_vector(b))); - } else { - if (fold_can_2(a, b)) + else return fold_constgen_vector(fold, vec3_xorvf(fold_immvalue_vector(a), fold_immvalue_float(b))); } }