mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-13 03:16:05 +08:00
Make checker inline
This commit is contained in:
parent
9f27cea38f
commit
f402451812
@ -358,7 +358,8 @@ private object TEA {
|
||||
}
|
||||
}
|
||||
|
||||
private fun ByteArray.checkDataLengthAndReturnSelf(length: Int = this.size): ByteArray {
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
private inline fun ByteArray.checkDataLengthAndReturnSelf(length: Int = this.size): ByteArray {
|
||||
require(length % 8 == 0 && length >= 16) { "data must len % 8 == 0 && len >= 16 but given (length=$length) ${this.toUHexString()}" }
|
||||
return this
|
||||
}
|
Loading…
Reference in New Issue
Block a user