Remove blocks in NegativeLiteralTransformer when statement

Each case is very simple so I don't think we need to bother with the blocks.
master
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") @Suppress("NON_EXHAUSTIVE_WHEN")
when (expr.operator) { when (expr.operator) {
UnaryExpr.Operator.PLUS -> { UnaryExpr.Operator.PLUS -> expr.replace(operand)
expr.replace(operand) UnaryExpr.Operator.MINUS -> expr.replace(operand.negate())
}
UnaryExpr.Operator.MINUS -> {
expr.replace(operand.negate())
}
} }
} }
} }

Loading…
Cancel
Save