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:
@ -96,7 +96,7 @@ void Foam::functionObjects::codedFunctionObject::prepare
|
||||
|
||||
Foam::dlLibraryTable& Foam::functionObjects::codedFunctionObject::libs() const
|
||||
{
|
||||
return const_cast<Time&>(time_).libs();
|
||||
return time_.libs();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -60,6 +60,7 @@ Usage
|
||||
#{
|
||||
// Lookup U
|
||||
const volVectorField& U = mesh().lookupObject<volVectorField>("U");
|
||||
|
||||
// Write
|
||||
mag(U)().write();
|
||||
#};
|
||||
@ -99,7 +100,7 @@ class codedFunctionObject
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
// Protected Data
|
||||
|
||||
//- Input dictionary
|
||||
dictionary dict_;
|
||||
@ -118,7 +119,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
|
||||
|
||||
Reference in New Issue
Block a user