diff --git a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C index 02b111038be5f2d6322479681fb1a3c2356e801c..ef1a0a0a278a938244d3d8e8f9c9df20b365e703 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C @@ -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 ( diff --git a/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C b/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C index 16e8f0971a8f029d3034d1f8ce166559535efc4c..f26d2426812c47ecb2ab3aec4c02a3301e91cefe 100644 --- a/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C +++ b/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C @@ -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 "