From d0dbf4c58ecf4dda5925489096fea6252b6df094 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 10 Jan 2021 22:18:52 +0000 Subject: [PATCH] Make set subject of when Signed-off-by: Graham --- .../main/kotlin/org/openrs2/cache/NamedEntryCollection.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cache/src/main/kotlin/org/openrs2/cache/NamedEntryCollection.kt b/cache/src/main/kotlin/org/openrs2/cache/NamedEntryCollection.kt index 834fe219..88be188d 100644 --- a/cache/src/main/kotlin/org/openrs2/cache/NamedEntryCollection.kt +++ b/cache/src/main/kotlin/org/openrs2/cache/NamedEntryCollection.kt @@ -251,9 +251,9 @@ public abstract class NamedEntryCollection( } 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)