mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-29 13:27:46 +00:00
autofill-parser: opt into ExperimentalUnsignedTypes
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
71a0e02378
commit
2c93600bdf
@ -23,6 +23,7 @@ private const val BITMASK = 0xff.toByte()
|
|||||||
* https://github.com/square/okhttp/blob/1977136/okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt
|
* https://github.com/square/okhttp/blob/1977136/okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt
|
||||||
*/
|
*/
|
||||||
@Suppress("ComplexMethod", "NestedBlockDepth")
|
@Suppress("ComplexMethod", "NestedBlockDepth")
|
||||||
|
@OptIn(ExperimentalUnsignedTypes::class)
|
||||||
internal fun ByteArray.binarySearch(labels: List<ByteArray>, labelIndex: Int): String? {
|
internal fun ByteArray.binarySearch(labels: List<ByteArray>, labelIndex: Int): String? {
|
||||||
var low = 0
|
var low = 0
|
||||||
var high = size
|
var high = size
|
||||||
@ -55,7 +56,7 @@ internal fun ByteArray.binarySearch(labels: List<ByteArray>, labelIndex: Int): S
|
|||||||
// Compare the bytes. Note that the file stores UTF-8 encoded bytes, so we must compare
|
// Compare the bytes. Note that the file stores UTF-8 encoded bytes, so we must compare
|
||||||
// the
|
// the
|
||||||
// unsigned bytes.
|
// unsigned bytes.
|
||||||
@Suppress("EXPERIMENTAL_API_USAGE") compareResult = (byte0.toUByte() - byte1.toUByte()).toInt()
|
compareResult = (byte0.toUByte() - byte1.toUByte()).toInt()
|
||||||
if (compareResult != 0) {
|
if (compareResult != 0) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user