[Thermo] Phase::addSpecies takes shared_ptr by value
This helps to clarify that addSpecies stores a copy of the shared_ptr.
This commit is contained in:
parent
a63874e4b4
commit
a471e4316a
4 changed files with 4 additions and 4 deletions
|
|
@ -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<Species>& spec);
|
||||
virtual bool addSpecies(shared_ptr<Species> spec);
|
||||
|
||||
void addSpecies(const std::string& name, const doublereal* comp,
|
||||
doublereal charge = 0.0, doublereal size = 1.0);
|
||||
|
|
|
|||
|
|
@ -1310,7 +1310,7 @@ public:
|
|||
//@{
|
||||
|
||||
using Phase::addSpecies;
|
||||
virtual bool addSpecies(shared_ptr<Species>& spec);
|
||||
virtual bool addSpecies(shared_ptr<Species> spec);
|
||||
|
||||
//! Store a reference pointer to the XML tree containing the species data
|
||||
//! for this phase.
|
||||
|
|
|
|||
|
|
@ -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<Species>& spec) {
|
||||
bool Phase::addSpecies(shared_ptr<Species> spec) {
|
||||
m_species[spec->name] = spec;
|
||||
vector_fp comp(nElements());
|
||||
for (map<string, double>::const_iterator iter = spec->composition.begin();
|
||||
|
|
|
|||
|
|
@ -694,7 +694,7 @@ void ThermoPhase::installSlavePhases(Cantera::XML_Node* phaseNode)
|
|||
{
|
||||
}
|
||||
|
||||
bool ThermoPhase::addSpecies(shared_ptr<Species>& spec)
|
||||
bool ThermoPhase::addSpecies(shared_ptr<Species> spec)
|
||||
{
|
||||
bool added = Phase::addSpecies(spec);
|
||||
if (added) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue