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,8 +512,7 @@ private:
case '}':
if (!handler.EndObject(memberCount))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
else
return;
return;
default: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell());
}
}
......@@ -549,8 +548,7 @@ private:
case ']':
if (!handler.EndArray(elementCount))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
else
return;
return;
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