From 6725a9d52458cadc1f62eedd81ff6fe484984d4d Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 15 Dec 2019 04:01:09 +0800 Subject: [PATCH] Make RawGroupInfo.parseBy not inline --- .../network/protocol/tim/packet/action/GroupPacket.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/action/GroupPacket.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/action/GroupPacket.kt index 2f7b1bcf3..f7a40952a 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/action/GroupPacket.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/action/GroupPacket.kt @@ -52,9 +52,8 @@ internal data class RawGroupInfo( val members: Map ) : GroupPacket.InfoResponse { - @Suppress("NOTHING_TO_INLINE") // this function it only executed in one place. @UseExperimental(MiraiInternalAPI::class) - inline fun parseBy(group: Group): GroupInfo = group.bot.withSession { + fun parseBy(group: Group): GroupInfo = group.bot.withSession { val memberList = LockFreeLinkedList() members.forEach { entry: Map.Entry -> entry.key.qq().let { group.Member(it, entry.value, it.coroutineContext) } @@ -191,7 +190,7 @@ internal object GroupPacket : SessionPacketFactory { when (val flag = readByte().toInt()) { 0x02 -> GroupNotFound - 0x00 -> { + 0x00 -> debugPrintIfFail("解析群信息") { discardExact(4) // group internal id val group = readUInt() // group id