ENH: use singleton method for accessing runtime selection
STYLE: use alias to mark partialFaceAreaWeightAMI deprecation after v2012
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2020 PCOpt/NTUA
|
||||
Copyright (C) 2013-2020 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -757,9 +757,9 @@ Foam::autoPtr<Foam::NURBS3DVolume> Foam::NURBS3DVolume::New
|
||||
|
||||
Info<< "NURBS3DVolume type : " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -770,7 +770,7 @@ Foam::autoPtr<Foam::NURBS3DVolume> Foam::NURBS3DVolume::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<NURBS3DVolume>(cstrIter()(dict, mesh, computeParamCoors));
|
||||
return autoPtr<NURBS3DVolume>(ctorPtr(dict, mesh, computeParamCoors));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 PCOpt/NTUA
|
||||
Copyright (C) 2020 FOSS GP
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -120,9 +121,9 @@ Foam::autoPtr<Foam::controlPointsDefinition> Foam::controlPointsDefinition::New
|
||||
|
||||
Info<< "controlPointsDefinition type : " << type << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(type);
|
||||
auto* ctorPtr = dictionaryConstructorTable(type);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -133,7 +134,7 @@ Foam::autoPtr<Foam::controlPointsDefinition> Foam::controlPointsDefinition::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<controlPointsDefinition>(cstrIter()(box));
|
||||
return autoPtr<controlPointsDefinition>(ctorPtr(box));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user