Commit dc57c016 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

BUG: comparison with incorrect construction tables

- previously hidden when hashtable used a static method and a
  different class for end()
parent 805b76d4
......@@ -30,22 +30,24 @@ License
Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
(
const dictionary& dict, const objectRegistry& obr
const dictionary& dict,
const objectRegistry& obr
)
{
if (debug)
{
Pout<< "coordinateRotation::New(const dictionary&) : "
Pout<< "coordinateRotation::New"
"(const dictionary&, const objectRegistry&) : "
<< "constructing coordinateRotation"
<< endl;
}
word rotType = dict.lookup("type");
const word rotType = dict.lookup("type");
objectRegistryConstructorTable::iterator cstrIter =
objectRegistryConstructorTablePtr_->find(rotType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalIOErrorInFunction
(
......@@ -54,7 +56,7 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
<< rotType << nl << nl
<< "Valid coordinateRotation types are :" << nl
<< "[default: axes ]"
<< dictionaryConstructorTablePtr_->sortedToc()
<< objectRegistryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
}
......@@ -74,12 +76,12 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
<< endl;
}
word rotType = dict.lookup("type");
const word rotType = dict.lookup("type");
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(rotType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalIOErrorInFunction
(
......
......@@ -55,7 +55,7 @@ Foam::autoPtr<Foam::thermophysicalFunction> Foam::thermophysicalFunction::New
IstreamConstructorTable::iterator cstrIter =
IstreamConstructorTablePtr_->find(thermophysicalFunctionType);
if (cstrIter == IstreamConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown thermophysicalFunction type "
......@@ -87,7 +87,7 @@ Foam::autoPtr<Foam::thermophysicalFunction> Foam::thermophysicalFunction::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(thermophysicalFunctionType);
if (cstrIter == IstreamConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown thermophysicalFunction 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