mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: mark compatibility level for keyword functionObjectLibs (issue #912)
- was superseded by "libs" in 1612
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user