COMP: avoid autoPtr automatic cast conversion in more places

- Can result in inadvertent conversions where the user should really
  know or check if the pointer is valid prior to using.

- Still have several places to fix that are using the deprecated copy
  construct and copy assignment
This commit is contained in:
Mark Olesen
2019-01-25 12:45:22 +01:00
parent fe6abf0f61
commit d4b495131f
7 changed files with 23 additions and 20 deletions

View File

@ -203,7 +203,7 @@ void Foam::MultiComponentPhaseModel<BasePhaseModel, phaseThermo>::solveYi
forAllConstIters(this->fluid().phases(),iter2)
{
const volScalarField& alpha2 = iter2();
const volScalarField& alpha2 = iter2()();
if (&alpha2 == &alpha1)
{
continue;
@ -253,7 +253,7 @@ void Foam::MultiComponentPhaseModel<BasePhaseModel, phaseThermo>::solveYi
forAllConstIters(this->fluid().phases(), iter2)
{
//const volScalarField& alpha2 = iter2()().oldTime();
const volScalarField& alpha2 = iter2();
const volScalarField& alpha2 = iter2()();
if (&alpha2 == &alpha1)
{

View File

@ -1016,7 +1016,7 @@ void Foam::phaseSystem::addInterfacePorosity(fvVectorMatrix& UEqn)
forAllConstIters(phaseModels_, iteri)
{
const phaseModel& phasei = iteri();
const phaseModel& phasei = iteri()();
auto iterk = iteri;