diff --git a/include/cantera/thermo/ConstDensityThermo.h b/include/cantera/thermo/ConstDensityThermo.h index d24a35d8a..109af837a 100644 --- a/include/cantera/thermo/ConstDensityThermo.h +++ b/include/cantera/thermo/ConstDensityThermo.h @@ -68,17 +68,13 @@ public: */ ConstDensityThermo& operator=(const ConstDensityThermo& right); - - //! Duplication routine for objects which inherit from - //! %SpeciesThermo + //! Duplication routine for objects which inherit from %ThermoPhase /*! - * This virtual routine can be used to duplicate %SpeciesThermo objects - * inherited from %SpeciesThermo even if the application only has - * a pointer to %SpeciesThermo to work with. - * ->commented out because we first need to add copy constructors - * and assignment operators to all of the derived classes. + * This virtual routine can be used to duplicate %ThermoPhase objects + * inherited from %ThermoPhase even if the application only has + * a pointer to %ThermoPhase to work with. */ - virtual SpeciesThermo* duplMyselfAsSpeciesThermo() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; //! overloaded methods of class ThermoPhase virtual int eosType() const; diff --git a/src/thermo/ConstDensityThermo.cpp b/src/thermo/ConstDensityThermo.cpp index 8ba559808..3624db0c5 100644 --- a/src/thermo/ConstDensityThermo.cpp +++ b/src/thermo/ConstDensityThermo.cpp @@ -50,11 +50,11 @@ ConstDensityThermo& ConstDensityThermo::operator=(const ConstDensityThermo& righ } -SpeciesThermo* ConstDensityThermo::duplMyselfAsSpeciesThermo() const +ThermoPhase* ConstDensityThermo::duplMyselfAsThermoPhase() const { - ConstDensityThermo* cdt = new ConstDensityThermo(*this); - return (SpeciesThermo*) cdt; + return new ConstDensityThermo(*this); } + int ConstDensityThermo:: eosType() const {