Commit d178fd4e authored by Philipp A. Hartmann's avatar Philipp A. Hartmann

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.
parent 6b7f3464
......@@ -1004,7 +1004,7 @@ public:
template <typename InputStream>
GenericDocument& ParseStream(InputStream& is) {
return ParseStream<0, Encoding, InputStream>(is);
return ParseStream<kParseDefaultFlags, Encoding, InputStream>(is);
}
//! Parse JSON text from a mutable string.
......@@ -1024,7 +1024,7 @@ public:
}
GenericDocument& ParseInsitu(Ch* str) {
return ParseInsitu<0, Encoding>(str);
return ParseInsitu<kParseDefaultFlags, Encoding>(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<kParseDefaultFlags>(str);
}
//! Whether a parse error was occured in the last parsing.
......
......@@ -323,7 +323,7 @@ public:
template <typename InputStream, typename Handler>
bool Parse(InputStream& is, Handler& handler) {
return Parse<0>(is, handler);
return Parse<kParseDefaultFlags>(is, handler);
}
bool HasParseError() const { return parseErrorCode_ != kParseErrorNone; }
......
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