mirror of
https://github.com/tristanpenman/valijson.git
synced 2024-12-13 18:45:11 +01:00
Make custom constraint loop C++03 friendly
This commit is contained in:
parent
078ee62301
commit
40f0f4868c
@ -884,11 +884,13 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &builder : constraintBuilders) {
|
for (ConstraintBuilders::const_iterator
|
||||||
if ((itr = object.find(builder.first)) != object.end()) {
|
builderItr = constraintBuilders.begin();
|
||||||
|
builderItr != constraintBuilders.end(); ++builderItr) {
|
||||||
|
if ((itr = object.find(builderItr->first)) != object.end()) {
|
||||||
constraints::Constraint *constraint = NULL;
|
constraints::Constraint *constraint = NULL;
|
||||||
try {
|
try {
|
||||||
constraint = builder.second->make(itr->second);
|
constraint = builderItr->second->make(itr->second);
|
||||||
rootSchema.addConstraintToSubschema(*constraint,
|
rootSchema.addConstraintToSubschema(*constraint,
|
||||||
&subschema);
|
&subschema);
|
||||||
delete constraint;
|
delete constraint;
|
||||||
|
Loading…
Reference in New Issue
Block a user