Use assertion for impossible case(The Predict() can ensure the token is ColonToken, otherwise it would be marked as Error state. So there is no need to check ColonToken again).
This commit is contained in:
parent
8576747373
commit
399333226b
@ -1273,12 +1273,9 @@ private:
|
|||||||
return dst;
|
return dst;
|
||||||
|
|
||||||
case IterativeParsingKeyValueDelimiterState:
|
case IterativeParsingKeyValueDelimiterState:
|
||||||
if (token == ColonToken) {
|
RAPIDJSON_ASSERT(token == ColonToken);
|
||||||
is.Take();
|
is.Take();
|
||||||
return dst;
|
return dst;
|
||||||
}
|
|
||||||
else
|
|
||||||
return IterativeParsingErrorState;
|
|
||||||
|
|
||||||
case IterativeParsingMemberValueState:
|
case IterativeParsingMemberValueState:
|
||||||
// Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state.
|
// Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user