diff --git a/include/cantera/oneD/Domain1D.h b/include/cantera/oneD/Domain1D.h index d00fe5c99..a41554f62 100644 --- a/include/cantera/oneD/Domain1D.h +++ b/include/cantera/oneD/Domain1D.h @@ -187,7 +187,7 @@ public: if (m_name[n] != "") { return m_name[n]; } else { - return "component " + int2str(int(n)); + return "component " + int2str(n); } } @@ -221,7 +221,7 @@ public: if (nl < m_nv || nu < m_nv) throw CanteraError("Domain1D::setBounds", "wrong array size for solution bounds. " - "Size should be at least "+int2str(int(m_nv))); + "Size should be at least "+int2str(m_nv)); std::copy(upper, upper + m_nv, m_max.begin()); std::copy(lower, lower + m_nv, m_min.begin()); } @@ -477,7 +477,7 @@ public: if (m_id != "") { return m_id; } else { - return std::string("domain ") + int2str(int(m_index)); + return std::string("domain ") + int2str(m_index); } } diff --git a/include/cantera/thermo/Constituents.h b/include/cantera/thermo/Constituents.h index 208e69acf..91c7c6521 100644 --- a/include/cantera/thermo/Constituents.h +++ b/include/cantera/thermo/Constituents.h @@ -42,8 +42,8 @@ public: * */ SpeciesRangeError(std::string func, size_t k, size_t kmax) : - CanteraError(func, "Species index " + int2str(int(k)) + - " outside valid range of 0 to " + int2str(int(kmax)-1)) {} + CanteraError(func, "Species index " + int2str(k) + + " outside valid range of 0 to " + int2str(kmax-1)) {} }; /******************************************************************/ diff --git a/src/base/misc.cpp b/src/base/misc.cpp index a428d8a0e..acaa4a984 100644 --- a/src/base/misc.cpp +++ b/src/base/misc.cpp @@ -1046,7 +1046,7 @@ void Application::thread_complete() XML_Node* get_XML_File(std::string file, int debug) { XML_Node* xtmp = app()->get_XML_File(file, debug) ; - //writelog("get_XML_File: returned from app:get_XML_FILE " + int2str(int(xtmp)) + "\n"); + //writelog("get_XML_File: returned from app:get_XML_FILE " + int2str(xtmp) + "\n"); return xtmp; } @@ -1626,12 +1626,12 @@ CanteraError::~CanteraError() throw() ArraySizeError::ArraySizeError(std::string proc, size_t sz, size_t reqd) : - CanteraError(proc, "Array size ("+int2str(int(sz))+ - ") too small. Must be at least "+int2str(int(reqd))) {} + CanteraError(proc, "Array size ("+int2str(sz)+ + ") too small. Must be at least "+int2str(reqd)) {} ElementRangeError::ElementRangeError(std::string func, size_t m, size_t mmax) : - CanteraError(func, "Element index " + int2str(int(m)) + - " outside valid range of 0 to " + int2str(int(mmax-1))) {} + CanteraError(func, "Element index " + int2str(m) + + " outside valid range of 0 to " + int2str(mmax-1)) {} diff --git a/src/clib/Cabinet.h b/src/clib/Cabinet.h index 99db07895..cd754a1d9 100644 --- a/src/clib/Cabinet.h +++ b/src/clib/Cabinet.h @@ -163,7 +163,7 @@ public: if (n < data.size()) { return *data[n]; } else { - throw Cantera::CanteraError("item","index out of range"+Cantera::int2str(int(n))); + throw Cantera::CanteraError("item","index out of range"+Cantera::int2str(n)); } } diff --git a/src/clib/ctmultiphase.cpp b/src/clib/ctmultiphase.cpp index 24fc3dd5f..3369bb99c 100644 --- a/src/clib/ctmultiphase.cpp +++ b/src/clib/ctmultiphase.cpp @@ -22,7 +22,7 @@ static bool checkSpecies(int i, size_t k) try { if (k >= mixCabinet::item(i).nSpecies()) throw CanteraError("checkSpecies", - "illegal species index ("+int2str(int(k))+") "); + "illegal species index ("+int2str(k)+") "); return true; } catch (CanteraError) { return false; @@ -34,7 +34,7 @@ static bool checkElement(int i, size_t m) try { if (m >= mixCabinet::item(i).nElements()) throw CanteraError("checkElement", - "illegal element index ("+int2str(int(m))+") "); + "illegal element index ("+int2str(m)+") "); return true; } catch (CanteraError) { return false; diff --git a/src/clib/ctxml.cpp b/src/clib/ctxml.cpp index 38f261d48..4621faeed 100644 --- a/src/clib/ctxml.cpp +++ b/src/clib/ctxml.cpp @@ -294,7 +294,7 @@ extern "C" { // array not big enough if (n < nv) { throw CanteraError("ctml_getFloatArray", - "array must be dimensioned at least "+int2str(int(nv))); + "array must be dimensioned at least "+int2str(nv)); } for (size_t i = 0; i < nv; i++) { diff --git a/src/kinetics/AqueousKinetics.cpp b/src/kinetics/AqueousKinetics.cpp index 428d55453..ee9ff1f5d 100644 --- a/src/kinetics/AqueousKinetics.cpp +++ b/src/kinetics/AqueousKinetics.cpp @@ -635,7 +635,7 @@ void AqueousKinetics::installGroups(size_t irxn, const vector& p) { if (!r.empty()) { - writelog("installing groups for reaction "+int2str(int(reactionNumber()))); + writelog("installing groups for reaction "+int2str(reactionNumber())); m_rgroups[reactionNumber()] = r; m_pgroups[reactionNumber()] = p; } diff --git a/src/kinetics/GasKinetics.cpp b/src/kinetics/GasKinetics.cpp index 48b45bb57..7aea82875 100644 --- a/src/kinetics/GasKinetics.cpp +++ b/src/kinetics/GasKinetics.cpp @@ -837,7 +837,7 @@ void GasKinetics::installGroups(size_t irxn, const vector& r, const vector& p) { if (!r.empty()) { - writelog("installing groups for reaction "+int2str(int(reactionNumber()))); + writelog("installing groups for reaction "+int2str(reactionNumber())); m_rgroups[reactionNumber()] = r; m_pgroups[reactionNumber()] = p; } diff --git a/src/kinetics/InterfaceKinetics.cpp b/src/kinetics/InterfaceKinetics.cpp index 5daa335ff..10e8916cb 100644 --- a/src/kinetics/InterfaceKinetics.cpp +++ b/src/kinetics/InterfaceKinetics.cpp @@ -390,7 +390,7 @@ void InterfaceKinetics::updateKc() size_t irxn = m_revindex[i]; if (irxn == npos || irxn >= nReactions()) { throw CanteraError("InterfaceKinetics", - "illegal value: irxn = "+int2str(int(irxn))); + "illegal value: irxn = "+int2str(irxn)); } m_rkc[irxn] = exp(m_rkc[irxn]*rrt); } @@ -1322,7 +1322,7 @@ void InterfaceKinetics::finalize() if (m_surf->nDim() != 2) throw CanteraError("InterfaceKinetics::finalize", "expected interface dimension = 2, but got dimension = " - +int2str(int(m_surf->nDim()))); + +int2str(m_surf->nDim())); @@ -1477,7 +1477,7 @@ void EdgeKinetics::finalize() if (m_surf->nDim() != 1) throw CanteraError("EdgeKinetics::finalize", "expected interface dimension = 1, but got dimension = " - +int2str(int(m_surf->nDim()))); + +int2str(m_surf->nDim())); m_finalized = true; } //================================================================================================ diff --git a/src/kinetics/Kinetics.cpp b/src/kinetics/Kinetics.cpp index 8b931f8ba..0e82fb0c7 100644 --- a/src/kinetics/Kinetics.cpp +++ b/src/kinetics/Kinetics.cpp @@ -280,7 +280,7 @@ size_t Kinetics::speciesPhaseIndex(size_t k) return n; } } - throw CanteraError("speciesPhaseIndex", "illegal species index: "+int2str(int(k))); + throw CanteraError("speciesPhaseIndex", "illegal species index: "+int2str(k)); return -1; } diff --git a/src/kinetics/StoichManager.h b/src/kinetics/StoichManager.h index 92a57c788..95fd3b737 100644 --- a/src/kinetics/StoichManager.h +++ b/src/kinetics/StoichManager.h @@ -152,7 +152,7 @@ static doublereal ppow(doublereal x, doublereal order) inline static std::string fmt(std::string r, size_t n) { - return r + "[" + int2str(int(n)) + "]"; + return r + "[" + int2str(n) + "]"; } diff --git a/src/kinetics/importKinetics.cpp b/src/kinetics/importKinetics.cpp index d6d8eacac..87417ff33 100644 --- a/src/kinetics/importKinetics.cpp +++ b/src/kinetics/importKinetics.cpp @@ -873,7 +873,7 @@ bool rxninfo::installReaction(int i, const XML_Node& r, Kinetics* k, || (c < 0.0 && m_rev[nn])) { if ((!dup || !m_dup[nn])) { string msg = string("Undeclared duplicate reactions detected: \n") - +"Reaction "+int2str(int(nn)+1)+": "+m_eqn[nn] + +"Reaction "+int2str(nn+1)+": "+m_eqn[nn] +"\nReaction "+int2str(i+1)+": "+eqn+"\n"; throw CanteraError("installReaction", msg); } diff --git a/src/oneD/Domain1D.cpp b/src/oneD/Domain1D.cpp index 5196083ee..bb37e9688 100644 --- a/src/oneD/Domain1D.cpp +++ b/src/oneD/Domain1D.cpp @@ -17,7 +17,7 @@ setTolerances(size_t nr, const doublereal* rtol, if (nr < m_nv || na < m_nv) throw CanteraError("Domain1D::setTolerances", "wrong array size for solution error tolerances. " - "Size should be at least "+int2str(int(m_nv))); + "Size should be at least "+int2str(m_nv)); if (ts >= 0) { copy(rtol, rtol + m_nv, m_rtol_ss.begin()); copy(atol, atol + m_nv, m_atol_ss.begin()); diff --git a/src/oneD/MultiNewton.cpp b/src/oneD/MultiNewton.cpp index 7f2517853..f58ce5992 100644 --- a/src/oneD/MultiNewton.cpp +++ b/src/oneD/MultiNewton.cpp @@ -142,11 +142,11 @@ void MultiNewton::step(doublereal* x, doublereal* step, "Jacobian is singular for domain "+ dom.id() + ", component " +dom.componentName(comp)+" at point " - +int2str(int(pt))+"\n(Matrix row " - +int2str(int(iok))+") \nsee file bandmatrix.csv\n"); + +int2str(pt)+"\n(Matrix row " + +int2str(iok)+") \nsee file bandmatrix.csv\n"); } else if (int(iok) < 0) throw CanteraError("MultiNewton::step", - "iok = "+int2str(int(iok))); + "iok = "+int2str(iok)); #ifdef DEBUG_STEP bool ok = false; diff --git a/src/oneD/Sim1D.cpp b/src/oneD/Sim1D.cpp index 6c0b980be..1ffb0a08b 100644 --- a/src/oneD/Sim1D.cpp +++ b/src/oneD/Sim1D.cpp @@ -97,7 +97,7 @@ doublereal Sim1D::value(size_t dom, size_t comp, size_t localPoint) const } if (j >= (int) m_x.size()) { throw CanteraError("Sim1D::value", "exceeded top of bounds: " + int2str(j) + - " >= " + int2str(int(m_x.size()))); + " >= " + int2str(m_x.size())); } #endif return m_x[iloc]; @@ -291,7 +291,7 @@ void Sim1D::solve(int loglevel, bool refine_grid) writelog(" success.\n\n"); writelog("Problem solved on ["); for (size_t mm = 1; mm < nDomains(); mm+=2) { - writelog(int2str(int(domain(mm).nPoints()))); + writelog(int2str(domain(mm).nPoints())); if (mm + 2 < nDomains()) { writelog(", "); } diff --git a/src/oneD/StFlow.cpp b/src/oneD/StFlow.cpp index 686825bb8..5eca939ff 100644 --- a/src/oneD/StFlow.cpp +++ b/src/oneD/StFlow.cpp @@ -39,7 +39,7 @@ void importSolution(size_t points, if (size_new < nv_new*points) { throw CanteraError("importSolution", "new solution array must have length "+ - int2str(int(nv_new*points))); + int2str(nv_new*points)); } size_t n, j, knew; @@ -1068,7 +1068,7 @@ void StFlow::restore(const XML_Node& dom, doublereal* soln) if (nm == "z") { getFloatArray(fa,x,false); np = x.size(); - writelog("Grid contains "+int2str(int(np))+ + writelog("Grid contains "+int2str(np)+ " points.\n"); readgrid = true; setupGrid(np, DATA_PTR(x)); diff --git a/src/oneD/refine.cpp b/src/oneD/refine.cpp index 138fe4f04..184cc9945 100644 --- a/src/oneD/refine.cpp +++ b/src/oneD/refine.cpp @@ -53,7 +53,7 @@ int Refiner::analyze(size_t n, const doublereal* z, { if (n >= m_npmax) { - writelog("max number of grid points reached ("+int2str(int(m_npmax))+".\n"); + writelog("max number of grid points reached ("+int2str(m_npmax)+".\n"); return -2; } @@ -183,11 +183,11 @@ int Refiner::analyze(size_t n, const doublereal* z, dz[j] = z[j+1] - z[j]; if (dz[j] > m_ratio*dz[j-1]) { m_loc[j] = 1; - m_c["point "+int2str(int(j))] = 1; + m_c["point "+int2str(j)] = 1; } if (dz[j] < dz[j-1]/m_ratio) { m_loc[j-1] = 1; - m_c["point "+int2str(int(j)-1)] = 1; + m_c["point "+int2str(j-1)] = 1; } //if (m_loc.size() + n > m_npmax) goto done; } @@ -212,7 +212,7 @@ void Refiner::show() +" New points inserted after grid points "); map::const_iterator b = m_loc.begin(); for (; b != m_loc.end(); ++b) { - writelog(int2str(int(b->first))+" "); + writelog(int2str(b->first)+" "); } writelog("\n"); writelog(" to resolve "); diff --git a/src/thermo/GeneralSpeciesThermo.cpp b/src/thermo/GeneralSpeciesThermo.cpp index 6a07f7e60..e19913cac 100644 --- a/src/thermo/GeneralSpeciesThermo.cpp +++ b/src/thermo/GeneralSpeciesThermo.cpp @@ -199,7 +199,7 @@ void GeneralSpeciesThermo::install_STIT(SpeciesThermoInterpType* stit_ptr) m_kk = index+1; } AssertThrow(m_sp[index] == 0, - "Index position isn't null, duplication of assignment: " + int2str(int(index))); + "Index position isn't null, duplication of assignment: " + int2str(index)); /* * Now, simply assign the position */ diff --git a/src/thermo/State.cpp b/src/thermo/State.cpp index f21265fb5..fa0fd98e8 100644 --- a/src/thermo/State.cpp +++ b/src/thermo/State.cpp @@ -275,7 +275,7 @@ void State::init(const vector_fp& mw) if (m_molwts[k] < 0.0) { throw CanteraError("State::init", "negative molecular weight for species number " - + int2str(int(k))); + + int2str(k)); } /* * Some surface phases may define species representing diff --git a/src/zeroD/Reactor.cpp b/src/zeroD/Reactor.cpp index dfd521ef6..a8ab19b33 100644 --- a/src/zeroD/Reactor.cpp +++ b/src/zeroD/Reactor.cpp @@ -343,7 +343,7 @@ void Reactor::addSensitivityReaction(size_t rxn) m_mult_save.push_back(1.0); if (rxn >= m_kin->nReactions()) throw CanteraError("Reactor::addSensitivityReaction", - "Reaction number out of range ("+int2str(int(rxn))+")"); + "Reaction number out of range ("+int2str(rxn)+")"); } diff --git a/src/zeroD/Wall.cpp b/src/zeroD/Wall.cpp index 37deb912a..302e139f7 100644 --- a/src/zeroD/Wall.cpp +++ b/src/zeroD/Wall.cpp @@ -139,7 +139,7 @@ void Wall::addSensitivityReaction(int leftright, size_t rxn) { if (rxn >= m_chem[leftright]->nReactions()) throw CanteraError("Wall::addSensitivityReaction", - "Reaction number out of range ("+int2str(int(rxn))+")"); + "Reaction number out of range ("+int2str(rxn)+")"); if (leftright == 0) { m_pleft.push_back(rxn); m_leftmult_save.push_back(1.0);