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

@@ -83,12 +83,8 @@ extern "C" void Discord_UpdateConnection()
else {
// reads
// json parser will use this buffer first, then allocate more if needed; I seriously doubt we send any messages that would use all of this, though.
char parseBuffer[32 * 1024];
for (;;) {
PoolAllocator pa(parseBuffer, sizeof(parseBuffer));
StackAllocator sa;
JsonDocument message(rapidjson::kObjectType, &pa, sizeof(sa.fixedBuffer_), &sa);
JsonDocument message;
if (!Connection->Read(message)) {
break;