Commit 29fa1558 authored by Milo Yip's avatar Milo Yip

Merge pull request #224 from pah/cleanup/223-coverity

Reader::Parse{Array,Object}: simplify switch
parents 8c8ce369 0ee38bc9
...@@ -512,7 +512,6 @@ private: ...@@ -512,7 +512,6 @@ private:
case '}': case '}':
if (!handler.EndObject(memberCount)) if (!handler.EndObject(memberCount))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
else
return; return;
default: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell()); default: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell());
} }
...@@ -549,7 +548,6 @@ private: ...@@ -549,7 +548,6 @@ private:
case ']': case ']':
if (!handler.EndArray(elementCount)) if (!handler.EndArray(elementCount))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
else
return; return;
default: RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell()); default: RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell());
} }
......
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