Move from enum.values() to enum.entries.

Resolves #13767
This commit is contained in:
Grzegorz Bobryk
2024-11-03 16:18:10 +01:00
committed by Greyson Parrelli
parent be92b3cf0a
commit cafbf48783
60 changed files with 95 additions and 95 deletions

View File

@@ -25,7 +25,7 @@ object TextToScript {
)
fun guessScript(text: CharSequence): SupportedScript {
val scriptCounts: MutableMap<SupportedScript, Int> = SupportedScript.values().associate { it to 0 }.toMutableMap()
val scriptCounts: MutableMap<SupportedScript, Int> = SupportedScript.entries.associate { it to 0 }.toMutableMap()
val input = text.toString()
for (i in 0 until input.codePointCount(0, input.length)) {

View File

@@ -21,7 +21,7 @@ object TypefaceCache {
*/
fun warm(context: Context, script: SupportedScript) {
val appContext = context.applicationContext
TextFont.values().forEach {
TextFont.entries.forEach {
get(appContext, it, script).subscribe()
}
}