Skip to content

Commit 52f3e9f

Browse files
author
Clement Champetier
committed
OptionLoader: warning if found a child option with no parent option
1 parent 88dc3d0 commit 52f3e9f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/AvTranscoder/OptionLoader.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ OptionLoader::OptionArray OptionLoader::loadOptions( void* av_class, int req_fla
262262
// iterate on child options
263263
for( std::vector<Option>::iterator itOption = childOptions.begin(); itOption != childOptions.end(); ++itOption )
264264
{
265+
bool parentFound = false;
265266
for( std::multimap<std::string, int>::iterator itUnit = optionUnitToIndex.begin(); itUnit != optionUnitToIndex.end(); ++itUnit )
266267
{
267268
if( itUnit->first == itOption->getUnit() )
@@ -277,8 +278,16 @@ OptionLoader::OptionArray OptionLoader::loadOptions( void* av_class, int req_fla
277278
if( itOption->getDefaultValueInt() == parentOption.getDefaultValueInt() )
278279
parentOption.setDefaultChildIndex( parentOption.getNbChilds() - 1 );
279280
}
281+
282+
parentFound = true;
283+
break;
280284
}
281285
}
286+
287+
if( ! parentFound )
288+
{
289+
std::cout << "Warning: Can't find a choice option for " << itOption->getName() << std::endl;
290+
}
282291
}
283292
return options;
284293
}

0 commit comments

Comments
 (0)