diff --git a/include/cantera/thermo/AdsorbateThermo.h b/include/cantera/thermo/AdsorbateThermo.h index 7c02dcf8f..62e38589c 100644 --- a/include/cantera/thermo/AdsorbateThermo.h +++ b/include/cantera/thermo/AdsorbateThermo.h @@ -49,7 +49,7 @@ public: * @param thigh output - Maximum temperature * @param pref output - reference pressure (Pa). */ - Adsorbate(int n, doublereal tlow, doublereal thigh, doublereal pref, + Adsorbate(size_t n, doublereal tlow, doublereal thigh, doublereal pref, const doublereal* coeffs) : m_lowT(tlow), m_highT(thigh), m_index(n) { @@ -81,7 +81,7 @@ public: return (SpeciesThermoInterpType*) np; } - virtual void install(std::string name, int index, int type, + virtual void install(std::string name, size_t index, int type, const doublereal* c, doublereal minTemp, doublereal maxTemp, doublereal refPressure) { m_be = c[1]; @@ -174,7 +174,7 @@ public: tlow = m_lowT; thigh = m_highT; pref = m_Pref; - coeffs[0] = m_nFreqs; + coeffs[0] = static_cast(m_nFreqs); coeffs[1] = m_be; for (size_t i = 2; i < m_nFreqs+2; i++) { coeffs[i] = m_freq[i-2]; @@ -189,7 +189,7 @@ protected: //! Reference state pressure doublereal m_Pref; //! species index - int m_index; + size_t m_index; size_t m_nFreqs; //! array of vib frequencies vector_fp m_freq; diff --git a/src/thermo/SpeciesThermoFactory.cpp b/src/thermo/SpeciesThermoFactory.cpp index 1ad39bb80..04e7ddebb 100644 --- a/src/thermo/SpeciesThermoFactory.cpp +++ b/src/thermo/SpeciesThermoFactory.cpp @@ -677,12 +677,12 @@ static void installNasa9ThermoFromXML(std::string speciesName, * @param tp Vector of XML Nodes that make up the parameterization */ static void installAdsorbateThermoFromXML(std::string speciesName, - SpeciesThermo& sp, int k, + SpeciesThermo& sp, size_t k, const XML_Node& f) { vector_fp freqs; doublereal tmin, tmax, pref = OneAtm; - int nfreq = 0; + size_t nfreq = 0; tmin = fpValue(f["Tmin"]); tmax = fpValue(f["Tmax"]); if (f.hasAttrib("P0")) { @@ -699,11 +699,11 @@ static void installAdsorbateThermoFromXML(std::string speciesName, getFloatArray(f.child("floatArray"), freqs, false); nfreq = freqs.size(); } - for (int n = 0; n < nfreq; n++) { + for (size_t n = 0; n < nfreq; n++) { freqs[n] *= 3.0e10; } vector_fp coeffs(nfreq + 2); - coeffs[0] = nfreq; + coeffs[0] = static_cast(nfreq); coeffs[1] = getFloat(f, "binding_energy", "toSI"); copy(freqs.begin(), freqs.end(), coeffs.begin() + 2); (&sp)->install(speciesName, k, ADSORBATE, &coeffs[0], tmin, tmax, pref);