From 22f35f2e8afedb70302e6cbf483172f2e1c6dfd8 Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Sat, 9 Oct 2004 15:07:50 +0000 Subject: [PATCH] added const in restoreState --- Cantera/src/Phase.cpp | 4 ++-- Cantera/src/Phase.h | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) 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; /**