STYLE: mark compatibility level for keyword functionObjectLibs (issue #912)

- was superseded by "libs" in 1612
This commit is contained in:
Mark Olesen
2018-07-05 10:41:27 +02:00
parent f7dc92d744
commit 8431964bcb

View File

@ -73,25 +73,30 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
Info<< "Selecting function " << functionType << endl; Info<< "Selecting function " << functionType << endl;
} }
if (dict.found("functionObjectLibs")) // Load any additional libraries
{ {
const_cast<Time&>(runTime).libs().open const auto finder =
( dict.csearchCompat("libs", {{"functionObjectLibs", 1612}});
dict,
"functionObjectLibs", if (finder.found())
dictionaryConstructorTablePtr_ {
); const_cast<Time&>(runTime).libs().open
} (
else dict,
{ finder.ref().keyword(),
const_cast<Time&>(runTime).libs().open dictionaryConstructorTablePtr_
( );
dict, }
"libs",
dictionaryConstructorTablePtr_
);
} }
// This is the simplified version without compatibility messages
// const_cast<Time&>(runTime).libs().open
// (
// dict,
// "libs",
// dictionaryConstructorTablePtr_
// );
if (!dictionaryConstructorTablePtr_) if (!dictionaryConstructorTablePtr_)
{ {
FatalErrorInFunction FatalErrorInFunction