mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use singleton method for accessing runtime selection
STYLE: use alias to mark partialFaceAreaWeightAMI deprecation after v2012
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -35,9 +35,9 @@ Foam::autoPtr<Foam::noiseModel> Foam::noiseModel::New(const dictionary& dict)
|
||||
|
||||
Info<< "Selecting noiseModel " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -48,7 +48,7 @@ Foam::autoPtr<Foam::noiseModel> Foam::noiseModel::New(const dictionary& dict)
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<noiseModel>(cstrIter()(dict.subDict(modelType + "Coeffs")));
|
||||
return autoPtr<noiseModel>(ctorPtr(dict.subDict(modelType + "Coeffs")));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -39,9 +39,9 @@ Foam::autoPtr<Foam::windowModel> Foam::windowModel::New
|
||||
|
||||
Info<< "Selecting windowModel " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -54,7 +54,7 @@ Foam::autoPtr<Foam::windowModel> Foam::windowModel::New
|
||||
|
||||
return autoPtr<windowModel>
|
||||
(
|
||||
cstrIter()(dict.subDict(modelType + "Coeffs"), nSamples)
|
||||
ctorPtr(dict.subDict(modelType + "Coeffs"), nSamples)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user