mirror of
https://git.suyu.dev/suyu/discord-rpc.git
synced 2026-01-03 05:05:21 +01:00
Clean up this allocation junk
This commit is contained in:
parent
38c0599380
commit
866e6d1104
3 changed files with 17 additions and 11 deletions
|
|
@ -34,10 +34,7 @@ void RpcConnection::Open()
|
|||
}
|
||||
|
||||
if (state == State::SentHandshake) {
|
||||
char parseBuffer[32 * 1024];
|
||||
PoolAllocator pa(parseBuffer, sizeof(parseBuffer));
|
||||
StackAllocator sa;
|
||||
JsonDocument message(rapidjson::kObjectType, &pa, sizeof(sa.fixedBuffer_), &sa);
|
||||
JsonDocument message;
|
||||
if (Read(message)) {
|
||||
auto cmd = message.FindMember("cmd");
|
||||
if (cmd == message.MemberEnd() || !cmd->value.IsString()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue