From 8bed0fc8756aee98e99dbc9c608fee668e3b6fad Mon Sep 17 00:00:00 2001 From: Graham Date: Tue, 1 Sep 2020 15:44:21 +0100 Subject: [PATCH] Rename getOrCreateIndex to createOrGetIndex I think this flows slightly better. Signed-off-by: Graham --- cache/src/main/java/dev/openrs2/cache/DiskStore.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cache/src/main/java/dev/openrs2/cache/DiskStore.kt b/cache/src/main/java/dev/openrs2/cache/DiskStore.kt index 42472436c1..54a8f278de 100644 --- a/cache/src/main/java/dev/openrs2/cache/DiskStore.kt +++ b/cache/src/main/java/dev/openrs2/cache/DiskStore.kt @@ -113,7 +113,7 @@ public class DiskStore private constructor( } } - private fun getOrCreateIndex(archive: Int): BufferedFileChannel { + private fun createOrGetIndex(archive: Int): BufferedFileChannel { val index = indexes[archive] if (index != null) { return index @@ -131,7 +131,7 @@ public class DiskStore private constructor( override fun create(archive: Int) { checkArchive(archive) - getOrCreateIndex(archive) + createOrGetIndex(archive) } override fun read(archive: Int, group: Int): ByteBuf { @@ -255,7 +255,7 @@ public class DiskStore private constructor( val newSize = buf.readableBytes() require(newSize <= Store.MAX_GROUP_SIZE) - val index = getOrCreateIndex(archive) + val index = createOrGetIndex(archive) alloc.buffer(TEMP_BUFFER_SIZE, TEMP_BUFFER_SIZE).use { tempBuf -> // read existing index entry, if it exists