Make custom constraint loop C++03 friendly

This commit is contained in:
Tristan Penman 2016-04-08 08:26:57 +10:00
parent 078ee62301
commit 40f0f4868c

View File

@ -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;