From 7355635daa59f8d3239347de46d206b7e3836610 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Tue, 8 Jun 2021 13:21:23 +0200 Subject: [PATCH] Remove a few useless parentheses in ButtonImpl.kt --- .../kotlin/fr/username404/snowygui/gui/feature/ButtonImpl.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/feature/ButtonImpl.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/feature/ButtonImpl.kt index 8abb662..a3e05de 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/feature/ButtonImpl.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/feature/ButtonImpl.kt @@ -41,13 +41,13 @@ sealed class ButtonImpl: ColoredElement(0.0, 0.0, 73, 8, opacity = 0.60F) { @JvmStatic fun initButtons() = addButtons( *Snowy.annotatedButtons.mapNotNull { - ((try { + try { it.getConstructor().newInstance() } catch (e: NoSuchMethodException) { try { it.getDeclaredField("INSTANCE").get(null) } catch (e: NoSuchFieldException) {} - }) as? ButtonImpl) + } as? ButtonImpl }.filterNot { (it.info.parent == Category.RISKY) && !riskyCheats }.plus(Configuration.foundMacros).toTypedArray()