ENH: Cleaned up hash table item found checks

This commit is contained in:
Andrew Heather
2017-05-19 11:15:35 +01:00
parent c1cbfe7a46
commit bb67ccd37d
231 changed files with 277 additions and 277 deletions

View File

@ -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 "

View File

@ -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 "

View File

@ -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"

View File

@ -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 "

View File

@ -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);

View File

@ -81,7 +81,7 @@ Foam::surfMeshSampler::New
wordConstructorTable::iterator cstrIter =
wordConstructorTablePtr_->find(sampleType);
if (cstrIter == wordConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown sample type "