Make "string&" arguments "const string&"

This way, these functions can accept constant strings, including string
literals.
This commit is contained in:
Ray Speth 2014-09-26 13:45:12 +00:00
parent 53102e8d70
commit f46b61a740
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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) {