Make inline

This commit is contained in:
Him188 2020-02-03 14:51:28 +08:00
parent ce7c9f8c82
commit 10e6c51948

View File

@ -34,7 +34,7 @@ fun ByteReadPacket.transferTo(outputStream: OutputStream) {
}
}
fun <R> ByteReadPacket.useBytes(
inline fun <R> ByteReadPacket.useBytes(
n: Int = remaining.toInt(),//not that safe but adequate
block: (data: ByteArray, length: Int) -> R
): R = ByteArrayPool.useInstance {