Replace if/else sequence with when

Signed-off-by: Graham <gpe@openrs2.org>
Graham 4 years ago
parent 6f815b6334
commit 0981303391
  1. 10
      patcher/src/main/kotlin/org/openrs2/patcher/transform/HighDpiTransformer.kt

@ -58,16 +58,20 @@ public class HighDpiTransformer : Transformer() {
return false
}
if (clazz.name == gameShell) {
when (clazz.name) {
gameShell -> {
addCanvasScaleField(clazz)
newMembers++
} else if (clazz.name in GL_INTERFACES) {
}
in GL_INTERFACES -> {
addPixelZoomMethod(clazz, Opcodes.ACC_ABSTRACT)
newMembers++
} else if (clazz.name in GL_IMPLS) {
}
in GL_IMPLS -> {
addPixelZoomMethod(clazz, Opcodes.ACC_FINAL or Opcodes.ACC_NATIVE)
newMembers++
}
}
return false
}

Loading…
Cancel
Save