mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: avoid raw dictionary lookup in functionObjects (issue #762)
Style changes:
- use lookupObjectRef instead of using const_cast
- use tmp::New factory
This commit is contained in:
@ -91,10 +91,10 @@ bool Foam::functionObjects::processorField::read(const dictionary& dict)
|
||||
|
||||
bool Foam::functionObjects::processorField::execute()
|
||||
{
|
||||
const volScalarField& procField =
|
||||
mesh_.lookupObject<volScalarField>("processorID");
|
||||
volScalarField& procField =
|
||||
mesh_.lookupObjectRef<volScalarField>("processorID");
|
||||
|
||||
const_cast<volScalarField&>(procField) ==
|
||||
procField ==
|
||||
dimensionedScalar("proci", dimless, Pstream::myProcNo());
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user