diff --git a/include/cantera/thermo/SimpleThermo.h b/include/cantera/thermo/SimpleThermo.h index a9a6e8d56..6e923df3f 100644 --- a/include/cantera/thermo/SimpleThermo.h +++ b/include/cantera/thermo/SimpleThermo.h @@ -69,6 +69,7 @@ public: * @param right Object to be copied */ SimpleThermo(const SimpleThermo& right) : + SpeciesThermo(right), ID(SIMPLE), m_tlow_max(0.0), m_thigh_min(1.e30), @@ -92,6 +93,7 @@ public: return *this; } + SpeciesThermo::operator=(right); m_loc = right.m_loc; m_index = right.m_index; m_tlow_max = right.m_tlow_max; diff --git a/include/cantera/thermo/SpeciesThermo.h b/include/cantera/thermo/SpeciesThermo.h index d84a6ae1a..fd0e288c0 100644 --- a/include/cantera/thermo/SpeciesThermo.h +++ b/include/cantera/thermo/SpeciesThermo.h @@ -161,22 +161,6 @@ public: //! Destructor virtual ~SpeciesThermo() {} - //! Copy Constructor for the %SpeciesThermo object. - /*! - * @param right Reference to %SpeciesThermo object to be copied into the - * current one. - */ - SpeciesThermo(const SpeciesThermo& right) {} - - //! Assignment operator for the %SpeciesThermo object - /*! - * @param right Reference to %SpeciesThermo object to be copied into the - * current one. - */ - SpeciesThermo& operator=(const SpeciesThermo& right) { - return *this; - } - //! Duplication routine for objects derived from SpeciesThermo /*! * This function can be used to duplicate objects derived from diff --git a/include/cantera/thermo/SpeciesThermoMgr.h b/include/cantera/thermo/SpeciesThermoMgr.h index b127e68b1..e71d86a6a 100644 --- a/include/cantera/thermo/SpeciesThermoMgr.h +++ b/include/cantera/thermo/SpeciesThermoMgr.h @@ -144,6 +144,7 @@ SpeciesThermoDuo::operator=(const SpeciesThermoDuo& right) return *this; } + SpeciesThermo::operator=(right); m_thermo1 = right.m_thermo1; m_thermo2 = right.m_thermo2; m_p0 = right.m_p0; diff --git a/src/thermo/GeneralSpeciesThermo.cpp b/src/thermo/GeneralSpeciesThermo.cpp index 45cb5475d..696eb258f 100644 --- a/src/thermo/GeneralSpeciesThermo.cpp +++ b/src/thermo/GeneralSpeciesThermo.cpp @@ -20,6 +20,7 @@ GeneralSpeciesThermo::GeneralSpeciesThermo() : } GeneralSpeciesThermo::GeneralSpeciesThermo(const GeneralSpeciesThermo& b) : + SpeciesThermo(b), m_tpoly(b.m_tpoly), m_tlow_max(b.m_tlow_max), m_thigh_min(b.m_thigh_min), @@ -43,6 +44,8 @@ GeneralSpeciesThermo::operator=(const GeneralSpeciesThermo& b) if (&b == this) { return *this; } + + SpeciesThermo::operator=(b); clear(); // Copy SpeciesThermoInterpType objects from 'b' for (STIT_map::const_iterator iter = b.m_sp.begin(); diff --git a/src/thermo/NasaThermo.cpp b/src/thermo/NasaThermo.cpp index 99f5e6e08..e06a5bc0f 100644 --- a/src/thermo/NasaThermo.cpp +++ b/src/thermo/NasaThermo.cpp @@ -39,6 +39,7 @@ NasaThermo& NasaThermo::operator=(const NasaThermo& right) return *this; } + SpeciesThermo::operator=(right); m_high = right.m_high; m_low = right.m_low; m_index = right.m_index; diff --git a/src/thermo/ShomateThermo.h b/src/thermo/ShomateThermo.h index 221342e88..39f8625e9 100644 --- a/src/thermo/ShomateThermo.h +++ b/src/thermo/ShomateThermo.h @@ -101,6 +101,7 @@ public: return *this; } + SpeciesThermo::operator=(right); m_high = right.m_high; m_low = right.m_low; m_index = right.m_index;