mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-03-10 03:29:59 +01:00
Fix warning and runtime delete error.
This commit is contained in:
parent
fff931b512
commit
dec1225c07
@ -106,7 +106,7 @@ struct SchemaValidationContext {
|
|||||||
|
|
||||||
~SchemaValidationContext() {
|
~SchemaValidationContext() {
|
||||||
delete notValidator;
|
delete notValidator;
|
||||||
delete patternPropertiesSchemas;
|
delete[] patternPropertiesSchemas;
|
||||||
delete[] objectDependencies;
|
delete[] objectDependencies;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -392,20 +392,16 @@ public:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (context.objectPatternValidatorType) {
|
if (context.objectPatternValidatorType == kPatternValidatorOnly) {
|
||||||
case kPatternValidatorOnly:
|
|
||||||
if (!patternValid)
|
if (!patternValid)
|
||||||
return false;
|
return false;
|
||||||
break;
|
}
|
||||||
case kPatternValidatorWithProperty:
|
else if (context.objectPatternValidatorType == kPatternValidatorWithProperty) {
|
||||||
if (!patternValid || !otherValid)
|
if (!patternValid || !otherValid)
|
||||||
return false;
|
return false;
|
||||||
break;
|
|
||||||
case kPatternValidatorWithAdditionalProperty:
|
|
||||||
if (!patternValid && !otherValid)
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
else if (!patternValid && !otherValid) // kPatternValidatorWithAdditionalProperty)
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allOf_.schemas)
|
if (allOf_.schemas)
|
||||||
@ -529,7 +525,7 @@ public:
|
|||||||
std::memset(context.patternPropertiesSchemas, 0, sizeof(BaseSchema<Encoding>*) * count);
|
std::memset(context.patternPropertiesSchemas, 0, sizeof(BaseSchema<Encoding>*) * count);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Key(Context& context, const Ch* str, SizeType len, bool) const {
|
bool Key(Context& context, const Ch* str, SizeType len, bool) const {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user