Simplify hasSideEffects() calls in AddSubTransformer

bzip2
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.operator = BinaryExpr.Operator.MINUS
expr.right = right.negate() expr.right = right.negate()
} else if (op == BinaryExpr.Operator.PLUS && isNegative(left)) { } else if (op == BinaryExpr.Operator.PLUS && isNegative(left)) {
if (left.hasSideEffects() || right.hasSideEffects()) { if (expr.hasSideEffects()) {
return@walk return@walk
} }

Loading…
Cancel
Save