Add divide support to IdentityTransformer

Signed-off-by: Graham <gpe@openrs2.dev>
Graham 4 years ago
parent 222323eaa0
commit 2acbfdce48
  1. 6
      deob-ast/src/main/java/dev/openrs2/deob/ast/transform/IdentityTransformer.kt

@ -46,6 +46,12 @@ class IdentityTransformer : Transformer() {
expr.replace(expr.left)
}
}
BinaryExpr.Operator.DIVIDE -> {
if (expr.right.isOne()) {
// x / 1 => x
expr.replace(expr.left)
}
}
}
}

Loading…
Cancel
Save