diff options
author | Kosta <konstantin.baumann@autodesk.com> | 2014-09-04 19:37:13 +0400 |
---|---|---|
committer | Kosta <konstantin.baumann@autodesk.com> | 2014-09-04 19:37:13 +0400 |
commit | 00ac1024eee997815f422f67055415cc1b3ccb3b (patch) | |
tree | b53f4452329de4c11aea165f8c1bacf7de77cec5 | |
parent | e70494bc00a60e47be06cb625889b09fe63342ea (diff) |
more changes
-rw-r--r-- | example/simplereader/simplereader.cpp | 2 | ||||
-rw-r--r-- | include/rapidjson/reader.h | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/example/simplereader/simplereader.cpp b/example/simplereader/simplereader.cpp index b47d9b2b..edbdb635 100644 --- a/example/simplereader/simplereader.cpp +++ b/example/simplereader/simplereader.cpp @@ -4,7 +4,7 @@ using namespace rapidjson; using namespace std; -struct MyHandler : public BaseReaderHandler<UTF8<>, MyHandler> { +struct MyHandler { bool Null() { cout << "Null()" << endl; return true; } bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << endl; return true; } bool Int(int i) { cout << "Int(" << i << ")" << endl; return true; } diff --git a/include/rapidjson/reader.h b/include/rapidjson/reader.h index e853bea4..885fe229 100644 --- a/include/rapidjson/reader.h +++ b/include/rapidjson/reader.h @@ -637,8 +637,10 @@ private: StackStream stackStream(stack_);
ParseStringToStream<parseFlags, SourceEncoding, TargetEncoding>(s, stackStream);
RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- const typename TargetEncoding::Ch* const str = stack_.template Pop<typename TargetEncoding::Ch>(stackStream.length_);
- success = (isKey ? handler.Key(str, stackStream.length_ - 1, false) : handler.String(str, stackStream.length_ - 1, false));
+ success = (isKey
+ ? handler.Key( stack_.template Pop<typename TargetEncoding::Ch>(stackStream.length_), stackStream.length_ - 1, false)
+ : handler.String(stack_.template Pop<typename TargetEncoding::Ch>(stackStream.length_), stackStream.length_ - 1, false)
+ );
}
if(!success)
|