ENH: use singleton method for accessing runtime selection

STYLE: use alias to mark partialFaceAreaWeightAMI deprecation after v2012
This commit is contained in:
Mark Olesen
2021-10-12 19:44:00 +02:00
parent 4fc6ec1d1d
commit ba8d6bddcc
337 changed files with 1555 additions and 1542 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2012-2016 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd.
Copyright (C) 2019-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -71,9 +71,9 @@ Foam::autoPtr<Foam::faceSelection> Foam::faceSelection::New
{
const word modelType(dict.get<word>("type"));
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
auto* ctorPtr = dictionaryConstructorTable(modelType);
if (!cstrIter.found())
if (!ctorPtr)
{
FatalIOErrorInLookup
(
@ -84,7 +84,7 @@ Foam::autoPtr<Foam::faceSelection> Foam::faceSelection::New
) << exit(FatalIOError);
}
return autoPtr<faceSelection>(cstrIter()(name, mesh, dict));
return autoPtr<faceSelection>(ctorPtr(name, mesh, dict));
}