aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <nea@nea.moe>2023-08-02 14:23:41 +0200
committerGitHub <noreply@github.com>2023-08-02 14:23:41 +0200
commit6cb3282b20bf2533a8fde4f6d30e0530d53f63dd (patch)
treedee0b1bc2a7bf77ea3651c60517ef2d702c4de2f /src/main/java/at/hannibal2/skyhanni/data
parentf7664fb62342e6b08462da634b19a2b05100c040 (diff)
downloadskyhanni-6cb3282b20bf2533a8fde4f6d30e0530d53f63dd.tar.gz
skyhanni-6cb3282b20bf2533a8fde4f6d30e0530d53f63dd.tar.bz2
skyhanni-6cb3282b20bf2533a8fde4f6d30e0530d53f63dd.zip
Merge pull request #351
* Performance improvements for the damage indicator * Using MutableMap.put * Using Sequence for every entity iteration
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt b/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt
index a0b8ae9bc..92f7bebb3 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.utils.APIUtil
import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.put
import at.hannibal2.skyhanni.utils.jsonobjects.MayorJson
import io.github.moulberry.notenoughupdates.util.SkyBlockTime
import kotlinx.coroutines.Dispatchers
@@ -74,8 +75,4 @@ class MayorElection {
private fun MayorJson.Election.getPairs() = year + 1 to candidates.bestCandidate()
private fun List<MayorJson.Candidate>.bestCandidate() = maxBy { it.votes }
-
- private infix fun <K, V> MutableMap<K, V>.put(pairs: Pair<K, V>) {
- this[pairs.first] = pairs.second
- }
} \ No newline at end of file