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:
authorPave Pimenov <pavel.pimenov@gmail.com>2020-09-12 19:53:06 +0300
committerPave Pimenov <pavel.pimenov@gmail.com>2020-09-12 19:53:06 +0300
commit3a65e2dd7f37684081ad8eb62fb64fbc418c4a47 (patch)
treea928fc539442f7a9acbfb4e76c36326b64d4db7a
parentce81bc9edfe773667a7a4454ba81dac72ed4364c (diff)
fix https://github.com/Tencent/rapidjson/issues/1778 (part 1)
-rw-r--r--include/rapidjson/schema.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/rapidjson/schema.h b/include/rapidjson/schema.h
index fc39d06c..4e5f2173 100644
--- a/include/rapidjson/schema.h
+++ b/include/rapidjson/schema.h
@@ -475,12 +475,12 @@ public:
AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document);
AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document);
AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document);
- }
- if (const ValueType* v = GetMember(value, GetNotString())) {
+ if (const ValueType* v = GetMember(value, GetNotString())) {
schemaDocument->CreateSchema(&not_, p.Append(GetNotString(), allocator_), *v, document);
notValidatorIndex_ = validatorCount_;
validatorCount_++;
+ }
}
// Object
@@ -915,7 +915,7 @@ public:
}
if (additionalPropertiesSchema_) {
- if (additionalPropertiesSchema_ && context.patternPropertiesSchemaCount > 0) {
+ if (context.patternPropertiesSchemaCount > 0) {
context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = additionalPropertiesSchema_;
context.valueSchema = typeless_;
context.valuePatternValidatorType = Context::kPatternValidatorWithAdditionalProperty;