mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: can add compile-time deprecated message for autoPtr::set()
- deprecated Feb-2018, but not marked as such. The set() method originally enforce an additional run-time check (Fatal if pointer was already set), but this was rarely used. In fact, the set() method was invariably used in constructors where the pointer by definition was unset. Can now mark as deprecated to catch the last of these. We prefer reset() for similarity with std::unique_ptr Eg, FOAM_EXTRA_CXXFLAGS="-DFoam_autoPtr_deprecate_setMethod" wmake
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -28,6 +28,7 @@ License
|
||||
#include "PurePhaseModel.H"
|
||||
#include "phaseSystem.H"
|
||||
#include "basicThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseModel, class phaseThermo>
|
||||
@ -39,14 +40,14 @@ Foam::PurePhaseModel<BasePhaseModel, phaseThermo>::PurePhaseModel
|
||||
:
|
||||
BasePhaseModel(fluid, phaseName)
|
||||
{
|
||||
thermoPtr_.set
|
||||
thermoPtr_.reset
|
||||
(
|
||||
phaseThermo::New
|
||||
(
|
||||
fluid.mesh(),
|
||||
phaseName,
|
||||
basicThermo::phasePropertyName(basicThermo::dictName, phaseName)
|
||||
).ptr()
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user