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:
@ -53,15 +53,14 @@ Foam::autoPtr<Foam::engineMesh> Foam::engineMesh::New
|
||||
|
||||
Info<< "Selecting engineMesh " << modelType << endl;
|
||||
|
||||
IOobjectConstructorTable::iterator cstrIter =
|
||||
IOobjectConstructorTablePtr_->find(modelType);
|
||||
auto cstrIter = IOobjectConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown engineMesh type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid engineMesh types are :" << endl
|
||||
<< "Valid engineMesh types :" << endl
|
||||
<< IOobjectConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user