@@ -2349,7 +2349,8 @@ RAPIDJSON_MULTILINEMACRO_END
23492349 if (!valid_) return false ; \
23502350 if ((!BeginValue() && !GetContinueOnErrors()) || (!CurrentSchema().method arg1 && !GetContinueOnErrors())) {\
23512351 RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_ ();\
2352- return valid_ = false ;\
2352+ valid_ = false ;\
2353+ return valid_;\
23532354 }
23542355
23552356#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_ (method, arg2 )\
@@ -2388,34 +2389,46 @@ RAPIDJSON_MULTILINEMACRO_END
23882389 bool StartObject () {
23892390 RAPIDJSON_SCHEMA_HANDLE_BEGIN_ (StartObject, (CurrentContext ()));
23902391 RAPIDJSON_SCHEMA_HANDLE_PARALLEL_ (StartObject, ());
2391- return valid_ = !outputHandler_ || outputHandler_->StartObject ();
2392+ valid_ = !outputHandler_ || outputHandler_->StartObject ();
2393+ return valid_;
23922394 }
23932395
23942396 bool Key (const Ch* str, SizeType len, bool copy) {
23952397 if (!valid_) return false ;
23962398 AppendToken (str, len);
2397- if (!CurrentSchema ().Key (CurrentContext (), str, len, copy) && !GetContinueOnErrors ()) return valid_ = false ;
2399+ if (!CurrentSchema ().Key (CurrentContext (), str, len, copy) && !GetContinueOnErrors ()) {
2400+ valid_ = false ;
2401+ return valid_;
2402+ }
23982403 RAPIDJSON_SCHEMA_HANDLE_PARALLEL_ (Key, (str, len, copy));
2399- return valid_ = !outputHandler_ || outputHandler_->Key (str, len, copy);
2404+ valid_ = !outputHandler_ || outputHandler_->Key (str, len, copy);
2405+ return valid_;
24002406 }
24012407
24022408 bool EndObject (SizeType memberCount) {
24032409 if (!valid_) return false ;
24042410 RAPIDJSON_SCHEMA_HANDLE_PARALLEL_ (EndObject, (memberCount));
2405- if (!CurrentSchema ().EndObject (CurrentContext (), memberCount) && !GetContinueOnErrors ()) return valid_ = false ;
2411+ if (!CurrentSchema ().EndObject (CurrentContext (), memberCount) && !GetContinueOnErrors ()) {
2412+ valid_ = false ;
2413+ return valid_;
2414+ }
24062415 RAPIDJSON_SCHEMA_HANDLE_END_ (EndObject, (memberCount));
24072416 }
24082417
24092418 bool StartArray () {
24102419 RAPIDJSON_SCHEMA_HANDLE_BEGIN_ (StartArray, (CurrentContext ()));
24112420 RAPIDJSON_SCHEMA_HANDLE_PARALLEL_ (StartArray, ());
2412- return valid_ = !outputHandler_ || outputHandler_->StartArray ();
2421+ valid_ = !outputHandler_ || outputHandler_->StartArray ();
2422+ return valid_;
24132423 }
24142424
24152425 bool EndArray (SizeType elementCount) {
24162426 if (!valid_) return false ;
24172427 RAPIDJSON_SCHEMA_HANDLE_PARALLEL_ (EndArray, (elementCount));
2418- if (!CurrentSchema ().EndArray (CurrentContext (), elementCount) && !GetContinueOnErrors ()) return valid_ = false ;
2428+ if (!CurrentSchema ().EndArray (CurrentContext (), elementCount) && !GetContinueOnErrors ()) {
2429+ valid_ = false ;
2430+ return valid_;
2431+ }
24192432 RAPIDJSON_SCHEMA_HANDLE_END_ (EndArray, (elementCount));
24202433 }
24212434
0 commit comments