Commit 790b7f12 authored by miloyip@gmail.com's avatar miloyip@gmail.com

Fixed Issue 27 Default allocator is used for GenericReader in GenericDocument::ParseStream

git-svn-id: https://rapidjson.googlecode.com/svn/trunk@77 c5894555-1306-4e8d-425f-1f6f381ee07c
parent 9fb77b11
......@@ -705,7 +705,7 @@ public:
template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
GenericDocument& ParseStream(InputStream& is) {
ValueType::SetNull(); // Remove existing root if exist
GenericReader<SourceEncoding, Encoding> reader;
GenericReader<SourceEncoding, Encoding, Allocator> reader;
if (reader.template Parse<parseFlags>(is, *this)) {
RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object
this->RawAssign(*stack_.template Pop<ValueType>(1)); // Add this-> to prevent issue 13.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment