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;
}
if (dict.found("functionObjectLibs"))
// Load any additional libraries
{
const_cast<Time&>(runTime).libs().open
(
dict,
"functionObjectLibs",
dictionaryConstructorTablePtr_
);
}
else
{
const_cast<Time&>(runTime).libs().open
(
dict,
"libs",
dictionaryConstructorTablePtr_
);
const auto finder =
dict.csearchCompat("libs", {{"functionObjectLibs", 1612}});
if (finder.found())
{
const_cast<Time&>(runTime).libs().open
(
dict,
finder.ref().keyword(),
dictionaryConstructorTablePtr_
);
}
}
// This is the simplified version without compatibility messages
// const_cast<Time&>(runTime).libs().open
// (
// dict,
// "libs",
// dictionaryConstructorTablePtr_
// );
if (!dictionaryConstructorTablePtr_)
{
FatalErrorInFunction