Clean up this allocation junk

This commit is contained in:
Chris Marsh
2017-07-25 09:06:48 -07:00
parent 38c0599380
commit 866e6d1104
3 changed files with 17 additions and 11 deletions

View File

@@ -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()) {