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
This commit is contained in:
parent
9fb77b114b
commit
790b7f127c
@ -705,7 +705,7 @@ public:
|
|||||||
template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
|
template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
|
||||||
GenericDocument& ParseStream(InputStream& is) {
|
GenericDocument& ParseStream(InputStream& is) {
|
||||||
ValueType::SetNull(); // Remove existing root if exist
|
ValueType::SetNull(); // Remove existing root if exist
|
||||||
GenericReader<SourceEncoding, Encoding> reader;
|
GenericReader<SourceEncoding, Encoding, Allocator> reader;
|
||||||
if (reader.template Parse<parseFlags>(is, *this)) {
|
if (reader.template Parse<parseFlags>(is, *this)) {
|
||||||
RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object
|
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.
|
this->RawAssign(*stack_.template Pop<ValueType>(1)); // Add this-> to prevent issue 13.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user