From d178fd4e94eff5f3c7b1c23d538230c78bbac80a Mon Sep 17 00:00:00 2001 From: "Philipp A. Hartmann" Date: Wed, 2 Jul 2014 01:08:46 +0200 Subject: [PATCH] Parse*: explicitly spell out kParseDefaultFlags Instead of hard-coding the value 0 for the parseFlags in the various parsing overloads, explicitly use kParseDefaultFlags to provide more self-documenting code. --- include/rapidjson/document.h | 6 +++--- include/rapidjson/reader.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index b9f9a275..b2cd3dec 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -1004,7 +1004,7 @@ public: template GenericDocument& ParseStream(InputStream& is) { - return ParseStream<0, Encoding, InputStream>(is); + return ParseStream(is); } //! Parse JSON text from a mutable string. @@ -1024,7 +1024,7 @@ public: } GenericDocument& ParseInsitu(Ch* str) { - return ParseInsitu<0, Encoding>(str); + return ParseInsitu(str); } //! Parse JSON text from a read-only string. @@ -1044,7 +1044,7 @@ public: } GenericDocument& Parse(const Ch* str) { - return Parse<0>(str); + return Parse(str); } //! Whether a parse error was occured in the last parsing. diff --git a/include/rapidjson/reader.h b/include/rapidjson/reader.h index c87e7d85..7edfad9b 100644 --- a/include/rapidjson/reader.h +++ b/include/rapidjson/reader.h @@ -323,7 +323,7 @@ public: template bool Parse(InputStream& is, Handler& handler) { - return Parse<0>(is, handler); + return Parse(is, handler); } bool HasParseError() const { return parseErrorCode_ != kParseErrorNone; }