Commit 8e76a9dc authored by Milo Yip's avatar Milo Yip

Fixes compilation error

need ‘typename’ before
‘rapidjson::StreamTraits<InputStream>::StreamCopyType
parent 789761ae
...@@ -109,7 +109,7 @@ struct BaseReaderHandler { ...@@ -109,7 +109,7 @@ struct BaseReaderHandler {
*/ */
template<typename InputStream> template<typename InputStream>
void SkipWhitespace(InputStream& is) { void SkipWhitespace(InputStream& is) {
StreamTraits<InputStream>::StreamCopyType s = is; // Use a local copy for optimization typename StreamTraits<InputStream>::StreamCopyType s = is; // Use a local copy for optimization
while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t') while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t')
s.Take(); s.Take();
is = s; is = s;
...@@ -378,7 +378,7 @@ private: ...@@ -378,7 +378,7 @@ private:
// Helper function to parse four hexidecimal digits in \uXXXX in ParseString(). // Helper function to parse four hexidecimal digits in \uXXXX in ParseString().
template<typename InputStream> template<typename InputStream>
unsigned ParseHex4(InputStream& is) { unsigned ParseHex4(InputStream& is) {
StreamTraits<InputStream>::StreamCopyType s = is; // Use a local copy for optimization typename StreamTraits<InputStream>::StreamCopyType s = is; // Use a local copy for optimization
unsigned codepoint = 0; unsigned codepoint = 0;
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
Ch c = s.Take(); Ch c = s.Take();
...@@ -419,7 +419,7 @@ private: ...@@ -419,7 +419,7 @@ private:
// Parse string and generate String event. Different code paths for kParseInsituFlag. // Parse string and generate String event. Different code paths for kParseInsituFlag.
template<unsigned parseFlags, typename InputStream, typename Handler> template<unsigned parseFlags, typename InputStream, typename Handler>
void ParseString(InputStream& is, Handler& handler) { void ParseString(InputStream& is, Handler& handler) {
StreamTraits<InputStream>::StreamCopyType s = is; // Local copy for optimization typename StreamTraits<InputStream>::StreamCopyType s = is; // Local copy for optimization
if (parseFlags & kParseInsituFlag) { if (parseFlags & kParseInsituFlag) {
Ch *head = s.PutBegin(); Ch *head = s.PutBegin();
ParseStringToStream<parseFlags, SourceEncoding, SourceEncoding>(s, s); ParseStringToStream<parseFlags, SourceEncoding, SourceEncoding>(s, s);
...@@ -499,7 +499,7 @@ private: ...@@ -499,7 +499,7 @@ private:
template<unsigned parseFlags, typename InputStream, typename Handler> template<unsigned parseFlags, typename InputStream, typename Handler>
void ParseNumber(InputStream& is, Handler& handler) { void ParseNumber(InputStream& is, Handler& handler) {
StreamTraits<InputStream>::StreamCopyType s = is; // Local copy for optimization typename StreamTraits<InputStream>::StreamCopyType s = is; // Local copy for optimization
// Parse minus // Parse minus
bool minus = false; bool minus = false;
if (s.Peek() == '-') { if (s.Peek() == '-') {
......
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