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:
@ -180,19 +180,18 @@ Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New
|
||||
const dictionary& decompositionDict
|
||||
)
|
||||
{
|
||||
word methodType(decompositionDict.lookup("method"));
|
||||
const word methodType(decompositionDict.lookup("method"));
|
||||
|
||||
Info<< "Selecting decompositionMethod " << methodType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(methodType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown decompositionMethod "
|
||||
<< methodType << nl << nl
|
||||
<< "Valid decompositionMethods are : " << endl
|
||||
<< "Valid decompositionMethods : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user