Skip to content

Commit 3a65e2d

Browse files
committed
fix Tencent#1778 (part 1)
1 parent ce81bc9 commit 3a65e2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/rapidjson/schema.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,12 +475,12 @@ class Schema {
475475
AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document);
476476
AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document);
477477
AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document);
478-
}
479478

480-
if (const ValueType* v = GetMember(value, GetNotString())) {
479+
if (const ValueType* v = GetMember(value, GetNotString())) {
481480
schemaDocument->CreateSchema(&not_, p.Append(GetNotString(), allocator_), *v, document);
482481
notValidatorIndex_ = validatorCount_;
483482
validatorCount_++;
483+
}
484484
}
485485

486486
// Object
@@ -915,7 +915,7 @@ class Schema {
915915
}
916916

917917
if (additionalPropertiesSchema_) {
918-
if (additionalPropertiesSchema_ && context.patternPropertiesSchemaCount > 0) {
918+
if (context.patternPropertiesSchemaCount > 0) {
919919
context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = additionalPropertiesSchema_;
920920
context.valueSchema = typeless_;
921921
context.valuePatternValidatorType = Context::kPatternValidatorWithAdditionalProperty;

0 commit comments

Comments
 (0)