mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: mutable libs() access in Time and other classes (#1737)
- This reflects the pre-existing coding situation where const_cast was used throughout to effect the same. STYLE: fix private/protected access - CodedField, codedMixedFvPatchField
This commit is contained in:
@ -89,7 +89,7 @@ void Foam::codedPoints0MotionSolver::prepare
|
||||
|
||||
Foam::dlLibraryTable& Foam::codedPoints0MotionSolver::libs() const
|
||||
{
|
||||
return const_cast<Time&>(mesh().time()).libs();
|
||||
return mesh().time().libs();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Get the loaded dynamic libraries
|
||||
//- Mutable access to the loaded dynamic libraries
|
||||
virtual dlLibraryTable& libs() const;
|
||||
|
||||
//- Adapt the context for the current object
|
||||
|
||||
@ -94,7 +94,7 @@ Foam::displacementMotionSolver::New
|
||||
{
|
||||
Info<< "Selecting motion solver: " << solverTypeName << endl;
|
||||
|
||||
const_cast<Time&>(mesh.time()).libs().open
|
||||
mesh.time().libs().open
|
||||
(
|
||||
solverDict,
|
||||
"motionSolverLibs",
|
||||
|
||||
@ -116,7 +116,7 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New
|
||||
|
||||
Info<< "Selecting motion solver: " << solverName << nl;
|
||||
|
||||
const_cast<Time&>(mesh.time()).libs().open
|
||||
mesh.time().libs().open
|
||||
(
|
||||
solverDict,
|
||||
"motionSolverLibs",
|
||||
|
||||
Reference in New Issue
Block a user