@@ -198,14 +198,22 @@ namespace Json {
198198
199199static const char * valueTypeToString (ValueType type) {
200200 switch (type) {
201- case nullValue: return " nullValue" ;
202- case intValue: return " intValue" ;
203- case uintValue: return " uintValue" ;
204- case realValue: return " realValue" ;
205- case stringValue: return " stringValue" ;
206- case booleanValue: return " booleanValue" ;
207- case arrayValue: return " arrayValue" ;
208- case objectValue: return " objectValue" ;
201+ case nullValue:
202+ return " nullValue" ;
203+ case intValue:
204+ return " intValue" ;
205+ case uintValue:
206+ return " uintValue" ;
207+ case realValue:
208+ return " realValue" ;
209+ case stringValue:
210+ return " stringValue" ;
211+ case booleanValue:
212+ return " booleanValue" ;
213+ case arrayValue:
214+ return " arrayValue" ;
215+ case objectValue:
216+ return " objectValue" ;
209217 }
210218 return " unknown" ;
211219}
@@ -946,8 +954,10 @@ void Value::clear() {
946954}
947955
948956void Value::resize (ArrayIndex newSize) {
949- JSON_ASSERT_MESSAGE (type () == nullValue || type () == arrayValue,
950- " in Json::Value::resize(): requires arrayValue, but found " << valueTypeToString (type ()));
957+ JSON_ASSERT_MESSAGE (
958+ type () == nullValue || type () == arrayValue,
959+ " in Json::Value::resize(): requires arrayValue, but found "
960+ << valueTypeToString (type ()));
951961 if (type () == nullValue)
952962 *this = Value (arrayValue);
953963 ArrayIndex oldSize = size ();
@@ -1080,7 +1090,8 @@ void Value::dupMeta(const Value& other) {
10801090Value& Value::resolveReference (const char * key) {
10811091 JSON_ASSERT_MESSAGE (
10821092 type () == nullValue || type () == objectValue,
1083- " in Json::Value::resolveReference(): requires objectValue, but found " << valueTypeToString (type ()));
1093+ " in Json::Value::resolveReference(): requires objectValue, but found "
1094+ << valueTypeToString (type ()));
10841095 if (type () == nullValue)
10851096 *this = Value (objectValue);
10861097 CZString actualKey (key, static_cast <unsigned >(strlen (key)),
@@ -1097,9 +1108,10 @@ Value& Value::resolveReference(const char* key) {
10971108
10981109// @param key is not null-terminated.
10991110Value& Value::resolveReference (char const * key, char const * end) {
1100- JSON_ASSERT_MESSAGE (
1101- type () == nullValue || type () == objectValue,
1102- " in Json::Value::resolveReference(key, end): requires objectValue, but found " << valueTypeToString (type ()));
1111+ JSON_ASSERT_MESSAGE (type () == nullValue || type () == objectValue,
1112+ " in Json::Value::resolveReference(key, end): requires "
1113+ " objectValue, but found "
1114+ << valueTypeToString (type ()));
11031115 if (type () == nullValue)
11041116 *this = Value (objectValue);
11051117 CZString actualKey (key, static_cast <unsigned >(end - key),
@@ -1210,7 +1222,8 @@ Value& Value::append(const Value& value) { return append(Value(value)); }
12101222
12111223Value& Value::append (Value&& value) {
12121224 JSON_ASSERT_MESSAGE (type () == nullValue || type () == arrayValue,
1213- " in Json::Value::append: requires arrayValue, but found " << valueTypeToString (type ()));
1225+ " in Json::Value::append: requires arrayValue, but found "
1226+ << valueTypeToString (type ()));
12141227 if (type () == nullValue) {
12151228 *this = Value (arrayValue);
12161229 }
@@ -1269,8 +1282,10 @@ bool Value::removeMember(String const& key, Value* removed) {
12691282}
12701283
12711284void Value::removeMember (const char * key) {
1272- JSON_ASSERT_MESSAGE (type () == nullValue || type () == objectValue,
1273- " in Json::Value::removeMember(): requires objectValue, but found " << valueTypeToString (type ()));
1285+ JSON_ASSERT_MESSAGE (
1286+ type () == nullValue || type () == objectValue,
1287+ " in Json::Value::removeMember(): requires objectValue, but found "
1288+ << valueTypeToString (type ()));
12741289 if (type () == nullValue)
12751290 return ;
12761291
@@ -1725,4 +1740,3 @@ Value& Path::make(Value& root) const {
17251740const char * version () { return JSONCPP_VERSION_STRING; }
17261741
17271742} // namespace Json
1728-
0 commit comments