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:
@ -314,9 +314,9 @@ Foam::expressions::exprResult::New
|
||||
|
||||
if (dict.getOrDefault("unsetValue", false))
|
||||
{
|
||||
auto cstrIter = emptyConstructorTablePtr_->cfind(resultType);
|
||||
auto* ctorPtr = emptyConstructorTable(resultType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -330,13 +330,13 @@ Foam::expressions::exprResult::New
|
||||
DebugInfo
|
||||
<< "Creating unset result of type " << resultType << nl;
|
||||
|
||||
return autoPtr<exprResult>(cstrIter()());
|
||||
return autoPtr<exprResult>(ctorPtr());
|
||||
}
|
||||
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(resultType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(resultType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -350,7 +350,7 @@ Foam::expressions::exprResult::New
|
||||
DebugInfo
|
||||
<< "Creating result of type " << resultType << nl;
|
||||
|
||||
return autoPtr<exprResult>(cstrIter()(dict));
|
||||
return autoPtr<exprResult>(ctorPtr(dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user