mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-03-09 03:03:38 +01:00
Merge pull request #224 from pah/cleanup/223-coverity
Reader::Parse{Array,Object}: simplify switch
This commit is contained in:
commit
29fa15580b
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user