From 4314aededd68112f88a20f5a06504e8b7261d587 Mon Sep 17 00:00:00 2001 From: Graham Date: Tue, 4 Feb 2020 20:01:28 +0000 Subject: [PATCH] Simplify hasSideEffects() calls in AddSubTransformer --- .../java/dev/openrs2/deob/ast/transform/AddSubTransformer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/AddSubTransformer.kt b/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/AddSubTransformer.kt index 7fa6201b..f3685960 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/AddSubTransformer.kt +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/AddSubTransformer.kt @@ -27,7 +27,7 @@ class AddSubTransformer : Transformer() { expr.operator = BinaryExpr.Operator.MINUS expr.right = right.negate() } else if (op == BinaryExpr.Operator.PLUS && isNegative(left)) { - if (left.hasSideEffects() || right.hasSideEffects()) { + if (expr.hasSideEffects()) { return@walk }