Remove blocks in NegativeLiteralTransformer when statement

Each case is very simple so I don't think we need to bother with the blocks.
bzip2
Graham 5 years ago
parent 130a05956e
commit 01ec848d49
  1. 8
      deob-ast/src/main/java/dev/openrs2/deob/ast/transform/NegativeLiteralTransformer.kt

@ -17,12 +17,8 @@ class NegativeLiteralTransformer : Transformer() {
@Suppress("NON_EXHAUSTIVE_WHEN")
when (expr.operator) {
UnaryExpr.Operator.PLUS -> {
expr.replace(operand)
}
UnaryExpr.Operator.MINUS -> {
expr.replace(operand.negate())
}
UnaryExpr.Operator.PLUS -> expr.replace(operand)
UnaryExpr.Operator.MINUS -> expr.replace(operand.negate())
}
}
}

Loading…
Cancel
Save