Simplify hasSideEffects() calls in AddSubTransformer

master
Graham 5 years ago
parent 784b14b66b
commit 4314aededd
  1. 2
      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
}

Loading…
Cancel
Save