From 424a2d7a31562dde6af0b2cc870f1712ed66c0fc Mon Sep 17 00:00:00 2001 From: Major Date: Thu, 5 Mar 2020 11:14:03 +0000 Subject: [PATCH] Fix compilation errors Signed-off-by: Major --- .../src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt | 4 ++-- .../dev/openrs2/deob/ast/transform/GlConstantTransformer.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt b/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt index 93f8476e..3a4b5739 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt @@ -70,7 +70,7 @@ class AstDeobfuscator(private val modules: List) { } 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) { } for (root in roots) { - root.printer = Function(printer::print) + root.printer = Function(printer::print) root.saveAll() } } diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/GlConstantTransformer.kt b/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/GlConstantTransformer.kt index 847e5827..2f3e55d5 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/GlConstantTransformer.kt +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/GlConstantTransformer.kt @@ -58,7 +58,7 @@ class GlConstantTransformer : Transformer() { override fun postTransform(units: Map) { 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) {