fix #76: fix compilation when there is not regex-library at all
Contributed by @mrspacemankey
This commit is contained in:
parent
49131a8713
commit
fa978cb766
@ -791,12 +791,14 @@ class object : public schema
|
|||||||
schema_p->second->validate(ptr / p.key(), p.value(), e);
|
schema_p->second->validate(ptr / p.key(), p.value(), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NO_STD_REGEX
|
||||||
// check all matching patternProperties
|
// check all matching patternProperties
|
||||||
for (auto &schema_pp : patternProperties_)
|
for (auto &schema_pp : patternProperties_)
|
||||||
if (REGEX_NAMESPACE::regex_search(p.key(), schema_pp.first)) {
|
if (REGEX_NAMESPACE::regex_search(p.key(), schema_pp.first)) {
|
||||||
a_prop_or_pattern_matched = true;
|
a_prop_or_pattern_matched = true;
|
||||||
schema_pp.second->validate(ptr / p.key(), p.value(), e);
|
schema_pp.second->validate(ptr / p.key(), p.value(), e);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// check additionalProperties as a last resort
|
// check additionalProperties as a last resort
|
||||||
if (!a_prop_or_pattern_matched && additionalProperties_) {
|
if (!a_prop_or_pattern_matched && additionalProperties_) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user