mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: comparison with incorrect construction tables
- previously hidden when hashtable used a static method and a different class for end()
This commit is contained in:
@ -30,22 +30,24 @@ License
|
|||||||
|
|
||||||
Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
|
Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
|
||||||
(
|
(
|
||||||
const dictionary& dict, const objectRegistry& obr
|
const dictionary& dict,
|
||||||
|
const objectRegistry& obr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "coordinateRotation::New(const dictionary&) : "
|
Pout<< "coordinateRotation::New"
|
||||||
|
"(const dictionary&, const objectRegistry&) : "
|
||||||
<< "constructing coordinateRotation"
|
<< "constructing coordinateRotation"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
word rotType = dict.lookup("type");
|
const word rotType = dict.lookup("type");
|
||||||
|
|
||||||
objectRegistryConstructorTable::iterator cstrIter =
|
objectRegistryConstructorTable::iterator cstrIter =
|
||||||
objectRegistryConstructorTablePtr_->find(rotType);
|
objectRegistryConstructorTablePtr_->find(rotType);
|
||||||
|
|
||||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalIOErrorInFunction
|
FatalIOErrorInFunction
|
||||||
(
|
(
|
||||||
@ -54,7 +56,7 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
|
|||||||
<< rotType << nl << nl
|
<< rotType << nl << nl
|
||||||
<< "Valid coordinateRotation types are :" << nl
|
<< "Valid coordinateRotation types are :" << nl
|
||||||
<< "[default: axes ]"
|
<< "[default: axes ]"
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< objectRegistryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,12 +76,12 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
word rotType = dict.lookup("type");
|
const word rotType = dict.lookup("type");
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
dictionaryConstructorTablePtr_->find(rotType);
|
dictionaryConstructorTablePtr_->find(rotType);
|
||||||
|
|
||||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalIOErrorInFunction
|
FatalIOErrorInFunction
|
||||||
(
|
(
|
||||||
|
|||||||
@ -55,7 +55,7 @@ Foam::autoPtr<Foam::thermophysicalFunction> Foam::thermophysicalFunction::New
|
|||||||
IstreamConstructorTable::iterator cstrIter =
|
IstreamConstructorTable::iterator cstrIter =
|
||||||
IstreamConstructorTablePtr_->find(thermophysicalFunctionType);
|
IstreamConstructorTablePtr_->find(thermophysicalFunctionType);
|
||||||
|
|
||||||
if (cstrIter == IstreamConstructorTablePtr_->end())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown thermophysicalFunction type "
|
<< "Unknown thermophysicalFunction type "
|
||||||
@ -87,7 +87,7 @@ Foam::autoPtr<Foam::thermophysicalFunction> Foam::thermophysicalFunction::New
|
|||||||
dictionaryConstructorTable::iterator cstrIter =
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
dictionaryConstructorTablePtr_->find(thermophysicalFunctionType);
|
dictionaryConstructorTablePtr_->find(thermophysicalFunctionType);
|
||||||
|
|
||||||
if (cstrIter == IstreamConstructorTablePtr_->end())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown thermophysicalFunction type "
|
<< "Unknown thermophysicalFunction type "
|
||||||
|
|||||||
Reference in New Issue
Block a user