Switch to Enum.entries
authorLanius Trolling <lanius@laniustrolling.dev>
Sun, 29 Oct 2023 14:09:03 +0000 (10:09 -0400)
committerLanius Trolling <lanius@laniustrolling.dev>
Sun, 29 Oct 2023 14:09:03 +0000 (10:09 -0400)
src/main/kotlin/info/mechyrdia/lore/parser_reply.kt
src/main/kotlin/info/mechyrdia/lore/parser_tags.kt
src/main/kotlin/info/mechyrdia/lore/parser_toc.kt

index 8dee964029ede83112b88e48cdc4fe8e4668fcce..8299c7a0f84d31e9ad55955f2d1b6ca0e9c2a364 100644 (file)
@@ -25,7 +25,7 @@ enum class TextParserReplyCounterTag(val type: TextParserTagType<CommentRepliesB
        
        companion object {
                val asTags: TextParserTags<CommentRepliesBuilder>
-                       get() = TextParserTags(values().associate { it.name to it.type })
+                       get() = TextParserTags(entries.associate { it.name to it.type })
        }
 }
 
index 63316e885251f0404c437b97f65137a67179a35b..9aa6b46afbe57df5e512ca9ac39fca7ebbc4b44c 100644 (file)
@@ -347,7 +347,7 @@ enum class TextParserFormattingTag(val type: TextParserTagType<Unit>) {
        
        companion object {
                val asTags: TextParserTags<Unit>
-                       get() = TextParserTags(values().associate { it.name to it.type })
+                       get() = TextParserTags(entries.associate { it.name to it.type })
        }
 }
 
@@ -413,7 +413,7 @@ enum class TextParserCommentTags(val type: TextParserTagType<Unit>) {
        
        companion object {
                val asTags: TextParserTags<Unit>
-                       get() = TextParserTags(values().associate { it.name to it.type })
+                       get() = TextParserTags(entries.associate { it.name to it.type })
        }
 }
 
index ec352cdc3400f46535cf076924346f3452a6dc2e..a8ef1971269a33dbe667d19b1a34be997741b793 100644 (file)
@@ -110,6 +110,6 @@ enum class TextParserToCBuilderTag(val type: TextParserTagType<TableOfContentsBu
        
        companion object {
                val asTags: TextParserTags<TableOfContentsBuilder>
-                       get() = TextParserTags(values().associate { it.name to it.type })
+                       get() = TextParserTags(entries.associate { it.name to it.type })
        }
 }