Commit 5a528a73 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

STYLE: additional cleanup of hashtable item found checks

parent 9fef27cb
......@@ -148,11 +148,7 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
typename dictionaryConstructorTable::iterator patchTypeCstrIter
= dictionaryConstructorTablePtr_->find(p.type());
if
(
patchTypeCstrIter != dictionaryConstructorTablePtr_->end()
&& patchTypeCstrIter() != cstrIter()
)
if (patchTypeCstrIter.found() && patchTypeCstrIter() != cstrIter())
{
FatalIOErrorInFunction
(
......
......@@ -136,11 +136,7 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
typename dictionaryConstructorTable::iterator patchTypeCstrIter
= dictionaryConstructorTablePtr_->find(p.type());
if
(
patchTypeCstrIter != dictionaryConstructorTablePtr_->end()
&& patchTypeCstrIter() != cstrIter()
)
if (patchTypeCstrIter.found() && patchTypeCstrIter() != cstrIter())
{
FatalIOErrorInFunction
(
......
......@@ -41,7 +41,7 @@ typename Table::iterator Foam::basicThermo::lookupThermo
typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
// Print error message if package not found in the table
if (cstrIter == tablePtr->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown " << Thermo::typeName << " type " << nl
......@@ -182,7 +182,7 @@ typename Table::iterator Foam::basicThermo::lookupThermo
typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
if (cstrIter == tablePtr->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown " << Thermo::typeName << " type "
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment