diff --git a/include/cantera/thermo/SpeciesThermoFactory.h b/include/cantera/thermo/SpeciesThermoFactory.h index 3846f8fa5..80fb0e05d 100644 --- a/include/cantera/thermo/SpeciesThermoFactory.h +++ b/include/cantera/thermo/SpeciesThermoFactory.h @@ -108,7 +108,7 @@ public: * @return Returns the pointer to the newly malloced species * property manager for the reference state */ - SpeciesThermo* newSpeciesThermoManager(std::string& stype) const; + SpeciesThermo* newSpeciesThermoManager(const std::string& stype) const; //! Create a new species property manager for the reference //! state for a group of species @@ -216,7 +216,7 @@ SpeciesThermo* newSpeciesThermoMgr(int type, SpeciesThermoFactory* f=0); * @param f Pointer to a SpeciesThermoFactory. optional parameter. * Defaults to NULL. */ -SpeciesThermo* newSpeciesThermoMgr(std::string& stype, +SpeciesThermo* newSpeciesThermoMgr(const std::string& stype, SpeciesThermoFactory* f=0); //! Function to return SpeciesThermo manager diff --git a/src/thermo/SpeciesThermoFactory.cpp b/src/thermo/SpeciesThermoFactory.cpp index 15a289eba..5d685950a 100644 --- a/src/thermo/SpeciesThermoFactory.cpp +++ b/src/thermo/SpeciesThermoFactory.cpp @@ -160,7 +160,7 @@ SpeciesThermo* SpeciesThermoFactory::newSpeciesThermo(int type) const } } -SpeciesThermo* SpeciesThermoFactory::newSpeciesThermoManager(std::string& stype) const +SpeciesThermo* SpeciesThermoFactory::newSpeciesThermoManager(const std::string& stype) const { std::string ltype = lowercase(stype); if (ltype == "nasa") { @@ -775,7 +775,7 @@ SpeciesThermo* newSpeciesThermoMgr(int type, SpeciesThermoFactory* f) return f->newSpeciesThermo(type); } -SpeciesThermo* newSpeciesThermoMgr(std::string& stype, +SpeciesThermo* newSpeciesThermoMgr(const std::string& stype, SpeciesThermoFactory* f) { if (f == 0) {