Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp A. Hartmann <pah@qo.cx>2015-01-11 20:46:58 +0300
committerPhilipp A. Hartmann <pah@qo.cx>2015-01-11 20:46:58 +0300
commit0ee38bc918a6fc4b03d234d11d01e03836f786b9 (patch)
tree48aa27444aecf597bb150640024586c9705aea5d /include
parent8c8ce3695703fe3be9cf7ae9dd9498e4dcb34994 (diff)
Reader::Parse{Array,Object}: simplify switch
Closes #223.
Diffstat (limited to 'include')
-rw-r--r--include/rapidjson/reader.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/rapidjson/reader.h b/include/rapidjson/reader.h
index 99dbc321..23944079 100644
--- a/include/rapidjson/reader.h
+++ b/include/rapidjson/reader.h
@@ -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());
}
}