From fe9fd1c017c5559a650fba68eb873b56a4b73054 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 8 Jun 2022 15:26:23 +0700 Subject: [PATCH] Make key creation as reified generic --- src/main/kotlin/ru/dbotthepony/mc/otm/storage/API.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/storage/API.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/storage/API.kt index 86610177b..0e0055ce0 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/storage/API.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/storage/API.kt @@ -49,7 +49,7 @@ interface IStorageStack { } } -fun T.key(): T { +inline fun T.key(): T { return copy().also { it.count = BigInteger.ONE } as T }