Replacing const_cast lookupObject to lookupObjectRef

This commit is contained in:
Henry Weller
2017-05-11 14:42:59 +01:00
parent e8f9d6a7fe
commit 9fbe68fca6
20 changed files with 70 additions and 144 deletions

View File

@ -152,10 +152,7 @@ Foam::volScalarField& Foam::basicThermo::lookupOrConstruct
fPtr->store(fPtr);
}
return const_cast<volScalarField&>
(
mesh.objectRegistry::lookupObject<volScalarField>(name)
);
return mesh.objectRegistry::lookupObjectRef<volScalarField>(name);
}