From 37b3acf40c2bcad29f7564a8416a17d6de2b9134 Mon Sep 17 00:00:00 2001 From: "Philipp A. Hartmann" Date: Sat, 1 Feb 2014 18:09:35 +0100 Subject: [PATCH] GenericDocument: forward allocator to GenericReader Fixes http://code.google.com/p/rapidjson/issues/detail?id=72. --- include/rapidjson/document.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index a41288e..7872460 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -719,7 +719,7 @@ public: template GenericDocument& ParseStream(InputStream& is) { ValueType::SetNull(); // Remove existing root if exist - GenericReader reader; + GenericReader reader(&GetAllocator()); if (reader.template Parse(is, *this)) { RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object this->RawAssign(*stack_.template Pop(1)); // Add this-> to prevent issue 13.