@@ -263,23 +263,24 @@ void loadOptions(OptionMap& outOptions, void* av_class, int req_flags)
263
263
}
264
264
265
265
// iterate on child options
266
- for (std::vector<Option>::iterator itOption = childOptions.begin (); itOption != childOptions.end (); ++itOption )
266
+ for (std::vector<Option>::iterator itChild = childOptions.begin (); itChild != childOptions.end (); ++itChild )
267
267
{
268
268
bool parentFound = false ;
269
- for (std::multimap<std::string, std::string>::iterator itUnit = optionUnitToParentName.begin ();
270
- itUnit != optionUnitToParentName.end (); ++itUnit )
269
+ for (std::multimap<std::string, std::string>::iterator itUnitToParents = optionUnitToParentName.begin ();
270
+ itUnitToParents != optionUnitToParentName.end (); ++itUnitToParents )
271
271
{
272
- if (itUnit->first == itOption->getUnit ())
272
+ const std::string parentUnit = itUnitToParents->first ;
273
+ const std::string parentName = itUnitToParents->second ;
274
+ if (parentUnit == itChild->getUnit ())
273
275
{
274
- std::string nameParentOption = itUnit->second ;
275
- Option& parentOption = outOptions.at (nameParentOption);
276
+ Option& parentOption = outOptions.at (parentName);
276
277
277
- parentOption.appendChild (*itOption );
278
+ parentOption.appendChild (*itChild );
278
279
279
280
// child of a Choice
280
281
if (parentOption.getType () == eOptionBaseTypeChoice)
281
282
{
282
- if (itOption ->getDefaultInt () == parentOption.getDefaultInt ())
283
+ if (itChild ->getDefaultInt () == parentOption.getDefaultInt ())
283
284
parentOption.setDefaultChildIndex (parentOption.getChilds ().size () - 1 );
284
285
}
285
286
@@ -290,7 +291,7 @@ void loadOptions(OptionMap& outOptions, void* av_class, int req_flags)
290
291
291
292
if (!parentFound)
292
293
{
293
- LOG_WARN (" Can't find a choice option for " << itOption ->getName ())
294
+ LOG_WARN (" Can't find a choice option for " << itChild ->getName ())
294
295
}
295
296
}
296
297
}
0 commit comments