mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Cleaned up hash table item found checks
This commit is contained in:
@ -42,7 +42,7 @@ Foam::autoPtr<Foam::meshToMeshMethod> Foam::meshToMeshMethod::New
|
||||
componentsConstructorTable::iterator cstrIter =
|
||||
componentsConstructorTablePtr_->find(methodName);
|
||||
|
||||
if (cstrIter == componentsConstructorTablePtr_->end())
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown meshToMesh type "
|
||||
|
||||
@ -451,7 +451,7 @@ Foam::autoPtr<Foam::sampledSet> Foam::sampledSet::New
|
||||
wordConstructorTable::iterator cstrIter =
|
||||
wordConstructorTablePtr_->find(sampleType);
|
||||
|
||||
if (cstrIter == wordConstructorTablePtr_->end())
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown sample type "
|
||||
|
||||
@ -36,7 +36,7 @@ Foam::autoPtr<Foam::surfaceReader> Foam::surfaceReader::New
|
||||
fileNameConstructorTable::iterator cstrIter =
|
||||
fileNameConstructorTablePtr_->find(readerType);
|
||||
|
||||
if (cstrIter == fileNameConstructorTablePtr_->end())
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown reader type \"" << readerType << "\"\n\n"
|
||||
|
||||
@ -64,7 +64,7 @@ Foam::autoPtr<Foam::sampledSurface> Foam::sampledSurface::New
|
||||
wordConstructorTable::iterator cstrIter =
|
||||
wordConstructorTablePtr_->find(sampleType);
|
||||
|
||||
if (cstrIter == wordConstructorTablePtr_->end())
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown sample type "
|
||||
|
||||
@ -57,7 +57,7 @@ Foam::surfaceWriter::New(const word& writeType)
|
||||
wordConstructorTable::iterator cstrIter =
|
||||
wordConstructorTablePtr_->find(writeType);
|
||||
|
||||
if (cstrIter == wordConstructorTablePtr_->end())
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
if (MeshedSurfaceProxy<face>::canWriteType(writeType))
|
||||
{
|
||||
@ -66,7 +66,7 @@ Foam::surfaceWriter::New(const word& writeType)
|
||||
return autoPtr<surfaceWriter>(new proxySurfaceWriter(writeType));
|
||||
}
|
||||
|
||||
if (cstrIter == wordConstructorTablePtr_->end())
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown write type \"" << writeType << "\"\n\n"
|
||||
@ -89,7 +89,7 @@ Foam::surfaceWriter::New(const word& writeType, const dictionary& optDict)
|
||||
wordDictConstructorTable::iterator cstrIter =
|
||||
wordDictConstructorTablePtr_->find(writeType);
|
||||
|
||||
if (cstrIter == wordDictConstructorTablePtr_->end())
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
// revert to versions without options
|
||||
return Foam::surfaceWriter::New(writeType);
|
||||
|
||||
@ -81,7 +81,7 @@ Foam::surfMeshSampler::New
|
||||
wordConstructorTable::iterator cstrIter =
|
||||
wordConstructorTablePtr_->find(sampleType);
|
||||
|
||||
if (cstrIter == wordConstructorTablePtr_->end())
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown sample type "
|
||||
|
||||
Reference in New Issue
Block a user