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

@ -42,8 +42,8 @@ Foam::autoPtr<Foam::reactionRateFlameArea> Foam::reactionRateFlameArea::New
Info<< "Selecting reaction rate flame area correlation "
<< reactionRateFlameAreaType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(reactionRateFlameAreaType);
auto cstrIter =
dictionaryConstructorTablePtr_->cfind(reactionRateFlameAreaType);
if (!cstrIter.found())
{
@ -51,9 +51,9 @@ Foam::autoPtr<Foam::reactionRateFlameArea> Foam::reactionRateFlameArea::New
(
dict
) << "Unknown reactionRateFlameArea type "
<< reactionRateFlameAreaType << endl << endl
<< "Valid reaction rate flame area types are :" << endl
<< dictionaryConstructorTablePtr_->toc()
<< reactionRateFlameAreaType << nl << nl
<< "Valid reaction rate flame area types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
}

View File

@ -53,16 +53,15 @@ Foam::combustionModels::psiCombustionModel::New
Info<< "Selecting combustion model " << combModelName << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(combModelName);
auto cstrIter = dictionaryConstructorTablePtr_->cfind(combModelName);
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown psiCombustionModel type "
<< combModelName << endl << endl
<< "Valid combustionModels are : " << endl
<< dictionaryConstructorTablePtr_->toc()
<< "Valid combustionModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}

View File

@ -53,16 +53,15 @@ Foam::combustionModels::rhoCombustionModel::New
Info<< "Selecting combustion model " << combTypeName << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(combTypeName);
auto cstrIter = dictionaryConstructorTablePtr_->cfind(combTypeName);
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown rhoCombustionModel type "
<< combTypeName << endl << endl
<< "Valid combustionModels are : " << endl
<< dictionaryConstructorTablePtr_->toc()
<< "Valid combustionModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}