Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1466 from ombre5733/rapidjson-update
Browse files Browse the repository at this point in the history
Update rapidjson to fix #710
  • Loading branch information
JoshEngebretson committed Mar 13, 2017
2 parents 7885731 + f9d0c1a commit 7386bd5
Show file tree
Hide file tree
Showing 41 changed files with 14,571 additions and 3,039 deletions.
6 changes: 4 additions & 2 deletions Source/Atomic/Resource/JSONFile.cpp
Expand Up @@ -209,7 +209,7 @@ static void ToRapidjsonValue(rapidjson::Value& rapidjsonValue, const JSONValue&
const char* name = i->first_.CString();
rapidjson::Value value;
ToRapidjsonValue(value, i->second_, allocator);
rapidjsonValue.AddMember(name, value, allocator);
rapidjsonValue.AddMember(rapidjson::Value::StringRefType(name), value, allocator);
// ATOMIC END
}
}
Expand All @@ -231,7 +231,9 @@ bool JSONFile::Save(Serializer& dest, const String& indendation) const
ToRapidjsonValue(document, root_, document.GetAllocator());

StringBuffer buffer;
PrettyWriter<StringBuffer> writer(buffer, &(document.GetAllocator()));
// ATOMIC BEGIN
PrettyWriter<StringBuffer, rapidjson::UTF8<>, rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator<> > writer(buffer, &(document.GetAllocator()));
// ATOMIC END
writer.SetIndent(!indendation.Empty() ? indendation.Front() : '\0', indendation.Length());

document.Accept(writer);
Expand Down

0 comments on commit 7386bd5

Please sign in to comment.