Fix compiler warnings issued by Visual Studio 2015

This commit is contained in:
Ray Speth 2018-08-28 13:07:26 -04:00
parent fc7c85f8d1
commit b7f3ab561b
6 changed files with 7 additions and 7 deletions

View file

@ -82,7 +82,7 @@ protected:
bool m_import_electron_transport; bool m_import_electron_transport;
//! electrical properties //! electrical properties
vector_int m_speciesCharge; vector_fp m_speciesCharge;
//! index of species with charges //! index of species with charges
std::vector<size_t> m_kCharge; std::vector<size_t> m_kCharge;
@ -98,7 +98,7 @@ protected:
vector_fp m_mobility; vector_fp m_mobility;
//! solving stage //! solving stage
int m_stage; size_t m_stage;
//! index of electron //! index of electron
size_t m_kElectron; size_t m_kElectron;

View file

@ -81,7 +81,7 @@ protected:
double omega11_n64(const double tstar, const double gamma); double omega11_n64(const double tstar, const double gamma);
//! electrical properties //! electrical properties
vector_int m_speciesCharge; vector_fp m_speciesCharge;
//! index of ions (exclude electron.) //! index of ions (exclude electron.)
std::vector<size_t> m_kIon; std::vector<size_t> m_kIon;

View file

@ -84,7 +84,7 @@ compositionMap parseCompString(const std::string& ss,
double value; double value;
try { try {
value = fpValueCheck(ss.substr(valstart, stop-valstart)); value = fpValueCheck(ss.substr(valstart, stop-valstart));
} catch (CanteraError& err) { } catch (CanteraError&) {
// If we have a key containing a colon, we expect this to fail. In // If we have a key containing a colon, we expect this to fail. In
// this case, take the current substring as part of the key and look // this case, take the current substring as part of the key and look
// to the right of the next colon for the corresponding value. // to the right of the next colon for the corresponding value.

View file

@ -169,7 +169,7 @@ extern "C" {
try { try {
// @todo This should not fail silently // @todo This should not fail silently
if (ReactorCabinet::item(i).type() >= ReactorType) { if (ReactorCabinet::item(i).type() >= ReactorType) {
ReactorCabinet::get<Reactor>(i).setChemistry(cflag); ReactorCabinet::get<Reactor>(i).setChemistry(cflag != 0);
} }
return 0; return 0;
} catch (...) { } catch (...) {

View file

@ -122,7 +122,7 @@ extern "C" {
} else if (SUNMatGetID(Jac) == SUNMATRIX_BAND) { } else if (SUNMatGetID(Jac) == SUNMATRIX_BAND) {
cols = SM_COLS_B(Jac); cols = SM_COLS_B(Jac);
} else { } else {
throw Cantera::CanteraError("ida_jacobian", "Unknown SUNMatrix type"); return 1; // Unknown SUNMatrix type
} }
f->evalJacobianDP(t, delta_t, c_j, NV_DATA_S(y), NV_DATA_S(yp), f->evalJacobianDP(t, delta_t, c_j, NV_DATA_S(y), NV_DATA_S(yp),
cols, NV_DATA_S(r)); cols, NV_DATA_S(r));

View file

@ -143,7 +143,7 @@ void Reactor::updateState(doublereal* y)
try { try {
TT = bmt::bracket_and_solve_root( TT = bmt::bracket_and_solve_root(
u_err, T, 1.2, true, bmt::eps_tolerance<double>(48), maxiter); u_err, T, 1.2, true, bmt::eps_tolerance<double>(48), maxiter);
} catch (std::exception& err) { } catch (std::exception&) {
// Try full-range bisection if bracketing fails (e.g. near // Try full-range bisection if bracketing fails (e.g. near
// temperature limits for the phase's equation of state) // temperature limits for the phase's equation of state)
try { try {