Make set subject of when

Signed-off-by: Graham <gpe@openrs2.org>
bzip2
Graham 4 years ago
parent ab3300a8c7
commit d0dbf4c58e
  1. 6
      cache/src/main/kotlin/org/openrs2/cache/NamedEntryCollection.kt

@ -251,9 +251,9 @@ public abstract class NamedEntryCollection<T : NamedEntry>(
}
val set = nameHashTable[newNameHash]
when {
set == null -> nameHashTable[newNameHash] = IntSortedSets.singleton(id)
set is IntSortedSets.Singleton -> {
when (set) {
null -> nameHashTable[newNameHash] = IntSortedSets.singleton(id)
is IntSortedSets.Singleton -> {
val newSet = IntAVLTreeSet()
newSet.add(set.firstInt())
newSet.add(id)

Loading…
Cancel
Save