Remove some unnecessary copy constructors and assignment operators
The implicitly-defined copy constructors and assignment operators work fine for these classes.
This commit is contained in:
parent
fe15a4fe9c
commit
64983aaf16
10 changed files with 0 additions and 238 deletions
|
|
@ -62,14 +62,10 @@ public:
|
|||
*/
|
||||
MultiPhase();
|
||||
|
||||
MultiPhase(const MultiPhase& right);
|
||||
|
||||
//! Destructor. Does nothing. Class MultiPhase does not take "ownership"
|
||||
//! (i.e. responsibility for destroying) the phase objects.
|
||||
virtual ~MultiPhase() {}
|
||||
|
||||
MultiPhase& operator=(const MultiPhase& right);
|
||||
|
||||
//! Add a vector of phases to the mixture
|
||||
/*!
|
||||
* See the single addPhases command. This just does a bunch of phases
|
||||
|
|
|
|||
|
|
@ -55,9 +55,6 @@ public:
|
|||
vcs_SpeciesProperties(size_t indexPhase, size_t indexSpeciesPhase,
|
||||
vcs_VolPhase* owning);
|
||||
virtual ~vcs_SpeciesProperties() {}
|
||||
|
||||
vcs_SpeciesProperties(const vcs_SpeciesProperties& b);
|
||||
vcs_SpeciesProperties& operator=(const vcs_SpeciesProperties& b);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,9 +87,6 @@ public:
|
|||
VCS_SPECIES_THERMO(size_t indexPhase, size_t indexSpeciesPhase);
|
||||
virtual ~VCS_SPECIES_THERMO() {}
|
||||
|
||||
VCS_SPECIES_THERMO(const VCS_SPECIES_THERMO& b);
|
||||
VCS_SPECIES_THERMO& operator=(const VCS_SPECIES_THERMO& b);
|
||||
|
||||
//! Duplication function for derived classes.
|
||||
virtual VCS_SPECIES_THERMO* duplMyselfAsVCS_SPECIES_THERMO();
|
||||
|
||||
|
|
|
|||
|
|
@ -92,8 +92,6 @@ public:
|
|||
LTPspecies(const XML_Node* const propNode = 0, const std::string name = "-",
|
||||
TransportPropertyType tp_ind = TP_UNKNOWN, const thermo_t* thermo = 0);
|
||||
|
||||
LTPspecies(const LTPspecies& right);
|
||||
LTPspecies& operator=(const LTPspecies& right);
|
||||
virtual ~LTPspecies() {}
|
||||
|
||||
//! Duplication routine
|
||||
|
|
@ -200,8 +198,6 @@ public:
|
|||
LTPspecies_Const(const XML_Node& propNode, const std::string name,
|
||||
TransportPropertyType tp_ind, const thermo_t* const thermo);
|
||||
|
||||
LTPspecies_Const(const LTPspecies_Const& right);
|
||||
LTPspecies_Const& operator=(const LTPspecies_Const& right);
|
||||
virtual LTPspecies* duplMyselfAsLTPspecies() const;
|
||||
|
||||
doublereal getSpeciesTransProp();
|
||||
|
|
@ -257,8 +253,6 @@ public:
|
|||
LTPspecies_Arrhenius(const XML_Node& propNode, const std::string name,
|
||||
TransportPropertyType tp_ind, const thermo_t* thermo);
|
||||
|
||||
LTPspecies_Arrhenius(const LTPspecies_Arrhenius& right);
|
||||
LTPspecies_Arrhenius& operator=(const LTPspecies_Arrhenius& right);
|
||||
virtual LTPspecies* duplMyselfAsLTPspecies() const;
|
||||
|
||||
//! Return the standard state species value for this transport property
|
||||
|
|
@ -343,8 +337,6 @@ public:
|
|||
*/
|
||||
LTPspecies_Poly(const XML_Node& propNode, const std::string name, TransportPropertyType tp_ind, const thermo_t* thermo);
|
||||
|
||||
LTPspecies_Poly(const LTPspecies_Poly& right);
|
||||
LTPspecies_Poly& operator=(const LTPspecies_Poly& right);
|
||||
virtual LTPspecies* duplMyselfAsLTPspecies() const;
|
||||
|
||||
doublereal getSpeciesTransProp();
|
||||
|
|
@ -406,8 +398,6 @@ public:
|
|||
LTPspecies_ExpT(const XML_Node& propNode, const std::string name,
|
||||
TransportPropertyType tp_ind, const thermo_t* thermo);
|
||||
|
||||
LTPspecies_ExpT(const LTPspecies_ExpT& right);
|
||||
LTPspecies_ExpT& operator=(const LTPspecies_ExpT& right);
|
||||
virtual LTPspecies* duplMyselfAsLTPspecies() const;
|
||||
|
||||
doublereal getSpeciesTransProp();
|
||||
|
|
|
|||
|
|
@ -107,8 +107,6 @@ public:
|
|||
*/
|
||||
LiquidTranInteraction(TransportPropertyType tp_ind = TP_UNKNOWN);
|
||||
|
||||
LiquidTranInteraction(const LiquidTranInteraction& right);
|
||||
LiquidTranInteraction& operator=(const LiquidTranInteraction& right);
|
||||
virtual ~LiquidTranInteraction();
|
||||
|
||||
//! initialize LiquidTranInteraction objects with thermo and XML node
|
||||
|
|
|
|||
|
|
@ -27,45 +27,6 @@ MultiPhase::MultiPhase() :
|
|||
{
|
||||
}
|
||||
|
||||
MultiPhase::MultiPhase(const MultiPhase& right) :
|
||||
m_temp(298.15),
|
||||
m_press(OneBar),
|
||||
m_nel(0),
|
||||
m_nsp(0),
|
||||
m_init(false),
|
||||
m_eloc(npos),
|
||||
m_Tmin(1.0),
|
||||
m_Tmax(100000.0)
|
||||
{
|
||||
operator=(right);
|
||||
}
|
||||
|
||||
MultiPhase& MultiPhase::operator=(const MultiPhase& right)
|
||||
{
|
||||
if (&right != this) {
|
||||
m_moles = right.m_moles;
|
||||
// shallow copy of phase pointers
|
||||
m_phase = right.m_phase;
|
||||
m_atoms = right.m_atoms;
|
||||
m_moleFractions = right.m_moleFractions;
|
||||
m_spphase = right.m_spphase;
|
||||
m_spstart = right.m_spstart;
|
||||
m_enames = right.m_enames;
|
||||
m_enamemap = right.m_enamemap;
|
||||
m_temp = right.m_temp;
|
||||
m_press = right.m_press;
|
||||
m_nel = right.m_nel;
|
||||
m_nsp = right.m_nsp;
|
||||
m_init = right.m_init;
|
||||
m_eloc = right.m_eloc;
|
||||
m_temp_OK = right.m_temp_OK;
|
||||
m_Tmin = right.m_Tmin;
|
||||
m_Tmax = right.m_Tmax;
|
||||
m_elemAbundances = right.m_elemAbundances;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
void MultiPhase::addPhases(MultiPhase& mix)
|
||||
{
|
||||
for (size_t n = 0; n < mix.nPhases(); n++) {
|
||||
|
|
|
|||
|
|
@ -23,39 +23,4 @@ vcs_SpeciesProperties::vcs_SpeciesProperties(size_t indexPhase,
|
|||
{
|
||||
}
|
||||
|
||||
vcs_SpeciesProperties::vcs_SpeciesProperties(const vcs_SpeciesProperties& b) :
|
||||
IndexPhase(b.IndexPhase),
|
||||
IndexSpeciesPhase(b.IndexSpeciesPhase),
|
||||
OwningPhase(b.OwningPhase),
|
||||
NumElements(b.NumElements),
|
||||
SpeciesThermo(b.SpeciesThermo),
|
||||
WtSpecies(b.WtSpecies),
|
||||
Charge(b.Charge),
|
||||
SurfaceSpecies(b.SurfaceSpecies),
|
||||
VolPM(b.VolPM),
|
||||
ReferenceMoleFraction(b.ReferenceMoleFraction)
|
||||
{
|
||||
SpName = b.SpName;
|
||||
FormulaMatrixCol = b.FormulaMatrixCol;
|
||||
}
|
||||
|
||||
vcs_SpeciesProperties&
|
||||
vcs_SpeciesProperties::operator=(const vcs_SpeciesProperties& b)
|
||||
{
|
||||
if (&b != this) {
|
||||
IndexPhase = b.IndexPhase;
|
||||
IndexSpeciesPhase = b.IndexSpeciesPhase;
|
||||
OwningPhase = b.OwningPhase;
|
||||
NumElements = b.NumElements;
|
||||
SpName = b.SpName;
|
||||
WtSpecies = b.WtSpecies;
|
||||
FormulaMatrixCol = b.FormulaMatrixCol;
|
||||
Charge = b.Charge;
|
||||
SurfaceSpecies = b.SurfaceSpecies;
|
||||
VolPM = b.VolPM;
|
||||
ReferenceMoleFraction = b.ReferenceMoleFraction;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,46 +38,6 @@ VCS_SPECIES_THERMO::VCS_SPECIES_THERMO(size_t indexPhase,
|
|||
SS0_Pref = 1.01325E5;
|
||||
}
|
||||
|
||||
VCS_SPECIES_THERMO::VCS_SPECIES_THERMO(const VCS_SPECIES_THERMO& b) :
|
||||
IndexPhase(b.IndexPhase),
|
||||
IndexSpeciesPhase(b.IndexSpeciesPhase),
|
||||
OwningPhase(b.OwningPhase),
|
||||
SS0_Model(b.SS0_Model),
|
||||
SS0_feSave(b.SS0_feSave),
|
||||
SS0_TSave(b.SS0_TSave),
|
||||
SS0_T0(b.SS0_T0),
|
||||
SS0_H0(b.SS0_H0),
|
||||
SS0_S0(b.SS0_S0),
|
||||
SS0_Cp0(b.SS0_Cp0),
|
||||
SS0_Pref(b.SS0_Pref),
|
||||
SSStar_Model(b.SSStar_Model),
|
||||
SSStar_Vol_Model(b.SSStar_Vol_Model),
|
||||
SSStar_Vol0(b.SSStar_Vol0)
|
||||
{
|
||||
}
|
||||
|
||||
VCS_SPECIES_THERMO&
|
||||
VCS_SPECIES_THERMO::operator=(const VCS_SPECIES_THERMO& b)
|
||||
{
|
||||
if (&b != this) {
|
||||
IndexPhase = b.IndexPhase;
|
||||
IndexSpeciesPhase = b.IndexSpeciesPhase;
|
||||
OwningPhase = b.OwningPhase;
|
||||
SS0_Model = b.SS0_Model;
|
||||
SS0_feSave = b.SS0_feSave;
|
||||
SS0_TSave = b.SS0_TSave;
|
||||
SS0_T0 = b.SS0_T0;
|
||||
SS0_H0 = b.SS0_H0;
|
||||
SS0_S0 = b.SS0_S0;
|
||||
SS0_Cp0 = b.SS0_Cp0;
|
||||
SS0_Pref = b.SS0_Pref;
|
||||
SSStar_Model = b.SSStar_Model;
|
||||
SSStar_Vol_Model = b.SSStar_Vol_Model;
|
||||
SSStar_Vol0 = b.SSStar_Vol0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
VCS_SPECIES_THERMO* VCS_SPECIES_THERMO::duplMyselfAsVCS_SPECIES_THERMO()
|
||||
{
|
||||
return new VCS_SPECIES_THERMO(*this);
|
||||
|
|
|
|||
|
|
@ -59,24 +59,6 @@ LTPspecies::LTPspecies(const XML_Node* const propNode, const std::string name,
|
|||
}
|
||||
}
|
||||
|
||||
LTPspecies::LTPspecies(const LTPspecies& right)
|
||||
{
|
||||
*this = right;
|
||||
}
|
||||
|
||||
LTPspecies& LTPspecies::operator=(const LTPspecies& right)
|
||||
{
|
||||
if (&right != this) {
|
||||
m_speciesName = right.m_speciesName;
|
||||
m_property = right.m_property;
|
||||
m_model = right.m_model;
|
||||
m_coeffs = right.m_coeffs;
|
||||
m_thermo = right.m_thermo;
|
||||
m_mixWeight = right.m_mixWeight;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
LTPspecies* LTPspecies::duplMyselfAsLTPspecies() const
|
||||
{
|
||||
return new LTPspecies(*this);
|
||||
|
|
@ -114,20 +96,6 @@ LTPspecies_Const::LTPspecies_Const(const XML_Node& propNode, const std::string n
|
|||
}
|
||||
}
|
||||
|
||||
LTPspecies_Const::LTPspecies_Const(const LTPspecies_Const& right)
|
||||
: LTPspecies()
|
||||
{
|
||||
*this = right; //use assignment operator to do other work
|
||||
}
|
||||
|
||||
LTPspecies_Const& LTPspecies_Const::operator=(const LTPspecies_Const& right)
|
||||
{
|
||||
if (&right != this) {
|
||||
LTPspecies::operator=(right);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
LTPspecies* LTPspecies_Const::duplMyselfAsLTPspecies() const
|
||||
{
|
||||
return new LTPspecies_Const(*this);
|
||||
|
|
@ -157,23 +125,6 @@ LTPspecies_Arrhenius::LTPspecies_Arrhenius(const XML_Node& propNode, const std::
|
|||
m_coeffs.push_back(log(A_k));
|
||||
}
|
||||
|
||||
LTPspecies_Arrhenius::LTPspecies_Arrhenius(const LTPspecies_Arrhenius& right)
|
||||
{
|
||||
*this = right;
|
||||
}
|
||||
|
||||
LTPspecies_Arrhenius& LTPspecies_Arrhenius::operator=(const LTPspecies_Arrhenius& right)
|
||||
{
|
||||
if (&right != this) {
|
||||
LTPspecies::operator=(right);
|
||||
m_temp = right.m_temp;
|
||||
m_logt = right.m_logt;
|
||||
m_prop = right.m_prop;
|
||||
m_logProp = right.m_logProp;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
LTPspecies* LTPspecies_Arrhenius::duplMyselfAsLTPspecies() const
|
||||
{
|
||||
return new LTPspecies_Arrhenius(*this);
|
||||
|
|
@ -212,22 +163,6 @@ LTPspecies_Poly::LTPspecies_Poly(const XML_Node& propNode, const std::string nam
|
|||
getFloatArray(propNode, m_coeffs, "true", "toSI");
|
||||
}
|
||||
|
||||
LTPspecies_Poly::LTPspecies_Poly(const LTPspecies_Poly& right)
|
||||
: LTPspecies()
|
||||
{
|
||||
*this = right;
|
||||
}
|
||||
|
||||
LTPspecies_Poly& LTPspecies_Poly::operator=(const LTPspecies_Poly& right)
|
||||
{
|
||||
if (&right != this) {
|
||||
LTPspecies::operator=(right);
|
||||
m_temp = right.m_temp;
|
||||
m_prop = right.m_prop;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
LTPspecies* LTPspecies_Poly::duplMyselfAsLTPspecies() const
|
||||
{
|
||||
return new LTPspecies_Poly(*this);
|
||||
|
|
@ -259,22 +194,6 @@ LTPspecies_ExpT::LTPspecies_ExpT(const XML_Node& propNode, const std::string nam
|
|||
getFloatArray(propNode, m_coeffs, "true", "toSI");
|
||||
}
|
||||
|
||||
LTPspecies_ExpT::LTPspecies_ExpT(const LTPspecies_ExpT& right)
|
||||
: LTPspecies()
|
||||
{
|
||||
*this = right; //use assignment operator to do other work
|
||||
}
|
||||
|
||||
LTPspecies_ExpT& LTPspecies_ExpT::operator=(const LTPspecies_ExpT& right)
|
||||
{
|
||||
if (&right != this) {
|
||||
LTPspecies::operator=(right);
|
||||
m_temp = right.m_temp;
|
||||
m_prop = right.m_prop;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
LTPspecies* LTPspecies_ExpT::duplMyselfAsLTPspecies() const
|
||||
{
|
||||
return new LTPspecies_ExpT(*this);
|
||||
|
|
|
|||
|
|
@ -144,27 +144,6 @@ void LiquidTranInteraction::init(const XML_Node& compModelNode,
|
|||
}
|
||||
}
|
||||
|
||||
LiquidTranInteraction::LiquidTranInteraction(const LiquidTranInteraction& right)
|
||||
{
|
||||
*this = right; //use assignment operator to do other work
|
||||
}
|
||||
|
||||
LiquidTranInteraction& LiquidTranInteraction::operator=(const LiquidTranInteraction& right)
|
||||
{
|
||||
if (&right != this) {
|
||||
m_model = right.m_model;
|
||||
m_property = right.m_property;
|
||||
m_thermo = right.m_thermo;
|
||||
m_Aij = right.m_Aij;
|
||||
m_Bij = right.m_Bij;
|
||||
m_Eij = right.m_Eij;
|
||||
m_Hij = right.m_Hij;
|
||||
m_Sij = right.m_Sij;
|
||||
m_Dij = right.m_Dij;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
LTI_Solvent::LTI_Solvent(TransportPropertyType tp_ind) :
|
||||
LiquidTranInteraction(tp_ind)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue