diff --git a/include/cantera/thermo/Phase.h b/include/cantera/thermo/Phase.h index fedf5c812..caec1b758 100644 --- a/include/cantera/thermo/Phase.h +++ b/include/cantera/thermo/Phase.h @@ -761,7 +761,7 @@ public: //! Add a Species to this Phase. Returns `true` if the species was //! successfully added, or `false` if the species was ignored. //! @see ignoreUndefinedElements addUndefinedElements throwUndefinedElements - virtual bool addSpecies(shared_ptr& spec); + virtual bool addSpecies(shared_ptr spec); void addSpecies(const std::string& name, const doublereal* comp, doublereal charge = 0.0, doublereal size = 1.0); diff --git a/include/cantera/thermo/ThermoPhase.h b/include/cantera/thermo/ThermoPhase.h index cb538b115..8d9e71feb 100644 --- a/include/cantera/thermo/ThermoPhase.h +++ b/include/cantera/thermo/ThermoPhase.h @@ -1310,7 +1310,7 @@ public: //@{ using Phase::addSpecies; - virtual bool addSpecies(shared_ptr& spec); + virtual bool addSpecies(shared_ptr spec); //! Store a reference pointer to the XML tree containing the species data //! for this phase. diff --git a/src/thermo/Phase.cpp b/src/thermo/Phase.cpp index 561394908..2c59ebbe4 100644 --- a/src/thermo/Phase.cpp +++ b/src/thermo/Phase.cpp @@ -837,7 +837,7 @@ size_t Phase::addUniqueElementAfterFreeze(const std::string& symbol, return addElement(symbol, weight, atomicNumber, entropy298, elem_type); } -bool Phase::addSpecies(shared_ptr& spec) { +bool Phase::addSpecies(shared_ptr spec) { m_species[spec->name] = spec; vector_fp comp(nElements()); for (map::const_iterator iter = spec->composition.begin(); diff --git a/src/thermo/ThermoPhase.cpp b/src/thermo/ThermoPhase.cpp index 2fd4911e6..ce76ae726 100644 --- a/src/thermo/ThermoPhase.cpp +++ b/src/thermo/ThermoPhase.cpp @@ -694,7 +694,7 @@ void ThermoPhase::installSlavePhases(Cantera::XML_Node* phaseNode) { } -bool ThermoPhase::addSpecies(shared_ptr& spec) +bool ThermoPhase::addSpecies(shared_ptr spec) { bool added = Phase::addSpecies(spec); if (added) {