]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Eh, only if peephole optimizations are turned on.
authorDale Weiler <killfieldengine@gmail.com>
Sat, 28 Sep 2013 10:41:40 +0000 (06:41 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 28 Sep 2013 10:41:40 +0000 (06:41 -0400)
ast.c

diff --git a/ast.c b/ast.c
index ffef07990f3da24cde6f51691040958db21e2bf6..3f5f02b5e5f4319a291121f57ab2e5afaa03c20b 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -518,7 +518,7 @@ ast_unary* ast_unary_new(lex_ctx_t ctx, int op,
     self->op = op;
     self->operand = expr;
 
-    if (ast_istype(expr, ast_unary)) {
+    if (ast_istype(expr, ast_unary) && OPTS_OPTIMIZATION(OPTIM_PEEPHOLE)) {
         ast_unary *prev = (ast_unary*)((ast_unary*)expr)->operand;
         if (ast_istype(prev, ast_unary)) {
             ast_expression_delete((ast_expression*)self);