From c4ea6cf150e79c3162dcfc7c5920548fa67030c6 Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 7 Mar 2020 17:24:12 +0000 Subject: [PATCH] Group isClassRenamable with populateClassMapping Signed-off-by: Graham --- .../dev/openrs2/deob/remap/TypedRemapper.kt | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt b/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt index c54356740c..74df31e483 100644 --- a/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt +++ b/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt @@ -130,6 +130,20 @@ class TypedRemapper private constructor( return mappedName } + private fun isClassRenamable(clazz: ClassMetadata): Boolean { + if (clazz.name in EXCLUDED_CLASSES || clazz.dependency) { + return false + } + + for (method in clazz.methods) { + if (clazz.getAccess(method)!! and Opcodes.ACC_NATIVE != 0) { + return false + } + } + + return true + } + private fun createFieldMapping( classPath: ClassPath, disjointSet: DisjointSet, @@ -186,20 +200,6 @@ class TypedRemapper private constructor( return true } - private fun isClassRenamable(clazz: ClassMetadata): Boolean { - if (clazz.name in EXCLUDED_CLASSES || clazz.dependency) { - return false - } - - for (method in clazz.methods) { - if (clazz.getAccess(method)!! and Opcodes.ACC_NATIVE != 0) { - return false - } - } - - return true - } - fun isMethodRenamable(classPath: ClassPath, partition: DisjointSet.Partition): Boolean { for (method in partition) { val clazz = classPath[method.owner]!!