From 30ff1862f91ecb97d6c9d461720ede58e452ae8d Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Fri, 27 Mar 2009 00:38:56 +0000 Subject: [PATCH] Eliminated various warning messages produced by VC++ --- Cantera/src/thermo/DebyeHuckel.cpp | 5 ++--- Cantera/src/thermo/DebyeHuckel.h | 6 +++--- Cantera/src/thermo/HMWSoln.cpp | 6 +++--- Cantera/src/thermo/HMWSoln.h | 6 +++--- Cantera/src/thermo/VPStandardStateTP.h | 2 +- Cantera/src/thermo/WaterSSTP.cpp | 4 ++-- Cantera/src/thermo/WaterSSTP.h | 4 ++-- 7 files changed, 16 insertions(+), 17 deletions(-) diff --git a/Cantera/src/thermo/DebyeHuckel.cpp b/Cantera/src/thermo/DebyeHuckel.cpp index 479a7dbc7..9ed9d86ef 100644 --- a/Cantera/src/thermo/DebyeHuckel.cpp +++ b/Cantera/src/thermo/DebyeHuckel.cpp @@ -21,7 +21,6 @@ #endif #include "DebyeHuckel.h" -//#include "importCTML.h" #include "ThermoFactory.h" #include "WaterProps.h" #include "PDSS_Water.h" @@ -445,7 +444,7 @@ namespace Cantera { * NOTE: This is a virtual function, overwritten function from the State.h * class */ - void DebyeHuckel::setMolarDensity(doublereal conc) { + void DebyeHuckel::setMolarDensity(const doublereal conc) { double concI = molarDensity(); if (conc != concI) { throw CanteraError("Idea;MolalSoln::setMolarDensity", @@ -458,7 +457,7 @@ namespace Cantera { * function sets the temperature, and makes sure that * the value propagates to underlying objects. */ - void DebyeHuckel::setTemperature(doublereal temp) { + void DebyeHuckel::setTemperature(const doublereal temp) { _updateStandardStateThermo(); State::setTemperature(temp); } diff --git a/Cantera/src/thermo/DebyeHuckel.h b/Cantera/src/thermo/DebyeHuckel.h index 63d043e47..76ec0a1bf 100644 --- a/Cantera/src/thermo/DebyeHuckel.h +++ b/Cantera/src/thermo/DebyeHuckel.h @@ -816,7 +816,7 @@ namespace Cantera { * * @param rho Input density (kg/m^3). */ - void setDensity(doublereal rho); + void setDensity(const doublereal rho); //! Set the internally storred molar density (kmol/m^3) of the phase. /** @@ -831,7 +831,7 @@ namespace Cantera { * * @param conc Input molar density (kmol/m^3). */ - virtual void setMolarDensity(doublereal conc); + virtual void setMolarDensity(const doublereal conc); //! Set the temperature (K) /*! @@ -844,7 +844,7 @@ namespace Cantera { * * @param temp Temperature in kelvin */ - virtual void setTemperature(doublereal temp); + virtual void setTemperature(const doublereal temp); /** * The isothermal compressibility. Units: 1/Pa. diff --git a/Cantera/src/thermo/HMWSoln.cpp b/Cantera/src/thermo/HMWSoln.cpp index c2e960772..09a65156f 100644 --- a/Cantera/src/thermo/HMWSoln.cpp +++ b/Cantera/src/thermo/HMWSoln.cpp @@ -860,7 +860,7 @@ namespace Cantera { * NOTE: This is an overwritten function from the State.h * class */ - void HMWSoln::setDensity(doublereal rho) { + void HMWSoln::setDensity(const doublereal rho) { double dens_old = density(); if (rho != dens_old) { @@ -878,7 +878,7 @@ namespace Cantera { * NOTE: This is an overwritten function from the State.h * class */ - void HMWSoln::setMolarDensity(doublereal rho) { + void HMWSoln::setMolarDensity(const doublereal rho) { throw CanteraError("HMWSoln::setMolarDensity", "Density is not an independent variable"); } @@ -888,7 +888,7 @@ namespace Cantera { * function sets the temperature, and makes sure that * the value propagates to underlying objects. */ - void HMWSoln::setTemperature(doublereal temp) { + void HMWSoln::setTemperature(const doublereal temp) { State::setTemperature(temp); //m_waterSS->setTemperature(temp); updateStandardStateThermo(); diff --git a/Cantera/src/thermo/HMWSoln.h b/Cantera/src/thermo/HMWSoln.h index b4effe879..bba7f5ac5 100644 --- a/Cantera/src/thermo/HMWSoln.h +++ b/Cantera/src/thermo/HMWSoln.h @@ -1503,7 +1503,7 @@ namespace Cantera { * * @param rho Input density (kg/m^3). */ - void setDensity(doublereal rho); + void setDensity(const doublereal rho); //! Set the internally storred molar density (kmol/m^3) for the phase. /** @@ -1518,7 +1518,7 @@ namespace Cantera { * * @param conc Input molar density (kmol/m^3). */ - void setMolarDensity(doublereal conc); + void setMolarDensity(const doublereal conc); //! Set the temperature (K) /*! @@ -1531,7 +1531,7 @@ namespace Cantera { * * @param temp Temperature in kelvin */ - virtual void setTemperature(doublereal temp); + virtual void setTemperature(const doublereal temp); /** * The isothermal compressibility. Units: 1/Pa. diff --git a/Cantera/src/thermo/VPStandardStateTP.h b/Cantera/src/thermo/VPStandardStateTP.h index 5c381b8ec..bcae6d1c8 100644 --- a/Cantera/src/thermo/VPStandardStateTP.h +++ b/Cantera/src/thermo/VPStandardStateTP.h @@ -263,7 +263,7 @@ namespace Cantera { * * @param T Temperature (kelvin) */ - virtual void setTemperature(doublereal T); + virtual void setTemperature(const doublereal T); //! Set the temperature and pressure at the same time diff --git a/Cantera/src/thermo/WaterSSTP.cpp b/Cantera/src/thermo/WaterSSTP.cpp index 99dae3074..001557e66 100644 --- a/Cantera/src/thermo/WaterSSTP.cpp +++ b/Cantera/src/thermo/WaterSSTP.cpp @@ -542,13 +542,13 @@ namespace Cantera { doublereal WaterSSTP::critDensity() const { return m_sub->Rhocrit(); } - void WaterSSTP::setTemperature(double temp) { + void WaterSSTP::setTemperature(const doublereal temp) { State::setTemperature(temp); doublereal dd = density(); m_sub->setState_TR(temp, dd); } - void WaterSSTP::setDensity(double dens) { + void WaterSSTP::setDensity(const doublereal dens) { State::setDensity(dens); doublereal temp = temperature(); m_sub->setState_TR(temp, dens); diff --git a/Cantera/src/thermo/WaterSSTP.h b/Cantera/src/thermo/WaterSSTP.h index 3e05623b4..3d964db67 100644 --- a/Cantera/src/thermo/WaterSSTP.h +++ b/Cantera/src/thermo/WaterSSTP.h @@ -400,9 +400,9 @@ namespace Cantera { virtual doublereal vaporFraction() const; - virtual void setTemperature(double temp); + virtual void setTemperature(const doublereal temp); - virtual void setDensity(double dens); + virtual void setDensity(const doublereal dens); void constructPhase();