Address some Kotlin language warnings

This commit is contained in:
arkon
2021-06-01 17:53:51 -04:00
parent 36e14b951a
commit 3854995ef2
9 changed files with 15 additions and 15 deletions

View File

@@ -44,7 +44,7 @@ object ChapterRecognition {
}
// Get chapter title with lower case
var name = chapter.name.toLowerCase()
var name = chapter.name.lowercase()
// Remove comma's from chapter.
name = name.replace(',', '.')
@@ -77,7 +77,7 @@ object ChapterRecognition {
}
// Remove manga title from chapter title.
val nameWithoutManga = name.replace(manga.title.toLowerCase(), "").trim()
val nameWithoutManga = name.replace(manga.title.lowercase(), "").trim()
// Check if first value is number after title remove.
if (updateChapter(withoutManga.find(nameWithoutManga), chapter)) {
@@ -147,6 +147,6 @@ object ChapterRecognition {
* x.a -> x.1, x.b -> x.2, etc
*/
private fun parseAlphaPostFix(alpha: Char): Float {
return ("0." + (alpha.toInt() - 96).toString()).toFloat()
return ("0." + (alpha.code - 96).toString()).toFloat()
}
}