Fix compilation errors

Signed-off-by: Major <major@emulate.rs>
bzip2
Major 5 years ago
parent 34507a92db
commit 424a2d7a31
  1. 4
      deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt
  2. 2
      deob-ast/src/main/java/dev/openrs2/deob/ast/transform/GlConstantTransformer.kt

@ -70,7 +70,7 @@ class AstDeobfuscator(private val modules: List<Path>) {
}
for (unit in root.compilationUnits) {
val name = unit.primaryType.orElseThrow().fullyQualifiedName.orElseThrow()
val name = unit.primaryType.get().fullyQualifiedName.get()
units[name] = unit
}
}
@ -80,7 +80,7 @@ class AstDeobfuscator(private val modules: List<Path>) {
}
for (root in roots) {
root.printer = Function<CompilationUnit, String>(printer::print)
root.printer = Function(printer::print)
root.saveAll()
}
}

@ -58,7 +58,7 @@ class GlConstantTransformer : Transformer() {
override fun postTransform(units: Map<String, CompilationUnit>) {
val glUnit = units[GL_CLASS] ?: return
val glInterface = glUnit.primaryType.orElseThrow()
val glInterface = glUnit.primaryType.get()
// remove existing declarations first to maintain sort order
for (enum in enums) {

Loading…
Cancel
Save