mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix kotlin code warning
This commit is contained in:
@@ -130,6 +130,6 @@ constructor(private val databaseKDBX: DatabaseKDBX,
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val EndHeaderValue = byteArrayOf('\r'.toByte(), '\n'.toByte(), '\r'.toByte(), '\n'.toByte())
|
||||
private val EndHeaderValue = byteArrayOf('\r'.code.toByte(), '\n'.code.toByte(), '\r'.code.toByte(), '\n'.code.toByte())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -765,7 +765,7 @@ class DatabaseOutputKDBX(private val mDatabaseKDBX: DatabaseKDBX,
|
||||
var character: Char
|
||||
for (element in text) {
|
||||
character = element
|
||||
val hexChar = character.toInt()
|
||||
val hexChar = character.code
|
||||
if (
|
||||
hexChar in 0x20..0xD7FF ||
|
||||
hexChar == 0x9 ||
|
||||
|
||||
@@ -144,7 +144,7 @@ internal class PublicSuffixListData(
|
||||
}
|
||||
|
||||
companion object {
|
||||
val WILDCARD_LABEL = byteArrayOf('*'.toByte())
|
||||
val WILDCARD_LABEL = byteArrayOf('*'.code.toByte())
|
||||
val PREVAILING_RULE = listOf("*")
|
||||
val EMPTY_RULE = listOf<String>()
|
||||
const val EXCEPTION_MARKER = '!'
|
||||
|
||||
@@ -36,7 +36,7 @@ internal fun ByteArray.binarySearch(labels: List<ByteArray>, labelIndex: Int): S
|
||||
while (true) {
|
||||
val byte0 = if (expectDot) {
|
||||
expectDot = false
|
||||
'.'.toByte()
|
||||
'.'.code.toByte()
|
||||
} else {
|
||||
labels[currentLabelIndex][currentLabelByteIndex] and BITMASK
|
||||
}
|
||||
@@ -103,7 +103,7 @@ internal fun ByteArray.binarySearch(labels: List<ByteArray>, labelIndex: Int): S
|
||||
*/
|
||||
private fun ByteArray.findStartOfLineFromIndex(start: Int): Int {
|
||||
var index = start
|
||||
while (index > -1 && this[index] != '\n'.toByte()) {
|
||||
while (index > -1 && this[index] != '\n'.code.toByte()) {
|
||||
index--
|
||||
}
|
||||
index++
|
||||
@@ -115,7 +115,7 @@ private fun ByteArray.findStartOfLineFromIndex(start: Int): Int {
|
||||
*/
|
||||
private fun ByteArray.findEndOfLineFromIndex(start: Int): Int {
|
||||
var end = 1
|
||||
while (this[start + end] != '\n'.toByte()) {
|
||||
while (this[start + end] != '\n'.code.toByte()) {
|
||||
end++
|
||||
}
|
||||
return end
|
||||
|
||||
Reference in New Issue
Block a user