Add underscore separator to field names

This allows us to distinguish between aClass1_23 and aClass12_3, for
example.
bzip2
Graham 5 years ago
parent 446dc00552
commit a777ae362e
  1. 3
      deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt

@ -86,7 +86,8 @@ class TypedRemapper private constructor(
} }
private fun generateName(prefixes: MutableMap<String, Int>, prefix: String): String { private fun generateName(prefixes: MutableMap<String, Int>, prefix: String): String {
return prefix + prefixes.merge(prefix, 1, Integer::sum) val separator = if (prefix.last().isDigit()) { "_" } else { "" }
return prefix + separator + prefixes.merge(prefix, 1, Integer::sum)
} }
private fun createClassMapping(classes: List<ClassMetadata>): Map<String, String> { private fun createClassMapping(classes: List<ClassMetadata>): Map<String, String> {

Loading…
Cancel
Save