mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use auto and cfind to simplify selector usage (issue #512)
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user