Remove blocks in NegativeLiteralTransformer when statement

Each case is very simple so I don't think we need to bother with the blocks.
pull/48/head
Graham 4 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