STYLE: use auto and cfind to simplify selector usage (issue #512)

This commit is contained in:
Mark Olesen
2017-07-03 10:36:03 +02:00
parent a09815fae2
commit bc1f2fa97e
246 changed files with 1109 additions and 1481 deletions

View File

@ -36,19 +36,18 @@ Foam::functionObjects::runTimeControls::runTimeCondition::New
stateFunctionObject& state
)
{
word conditionType(dict.lookup("type"));
const word conditionType(dict.lookup("type"));
Info<< "Selecting runTimeCondition " << conditionType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(conditionType);
auto cstrIter = dictionaryConstructorTablePtr_->cfind(conditionType);
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown runTimeCondition type "
<< conditionType << nl << nl
<< "Valid runTimeCondition types are:" << nl
<< "Valid runTimeCondition types :" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}