diff --git a/Cantera/src/Phase.cpp b/Cantera/src/Phase.cpp index 119da5521..56434a495 100755 --- a/Cantera/src/Phase.cpp +++ b/Cantera/src/Phase.cpp @@ -26,11 +26,11 @@ namespace Cantera { getMassFractions(state + 2); } - void Phase::restoreState(vector_fp& state) { + void Phase::restoreState(const vector_fp& state) { restoreState(state.size(),state.begin()); } - void Phase::restoreState(int lenstate, doublereal* state) { + void Phase::restoreState(int lenstate, const doublereal* state) { if (int(lenstate) >= nSpecies() + 2) { setMassFractions_NoNorm(state + 2); setTemperature(state[0]); diff --git a/Cantera/src/Phase.h b/Cantera/src/Phase.h index d32191cfb..7c78d7f75 100755 --- a/Cantera/src/Phase.h +++ b/Cantera/src/Phase.h @@ -73,9 +73,9 @@ namespace Cantera { /** * Restore a state saved on a previous call to saveState. */ - void restoreState(vector_fp& state); + void restoreState(const vector_fp& state); - void restoreState(int lenstate, doublereal* state); + void restoreState(int lenstate, const doublereal* state); /** * Set the species mole fractions by name. @@ -185,8 +185,9 @@ namespace Cantera { */ int m_kk; /** - * m_ndim is the dimensionality of the phase. Basically, volumetric phases - * have dimensionality 3 and surface phases have dimensionality 2. + * m_ndim is the dimensionality of the phase. + * Volumetric phases have dimensionality 3 and surface phases + * have dimensionality 2. */ int m_ndim; /**