From 056769913f1c1edbe40e07e92b90aefd19ceb8f7 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Thu, 1 Jul 2004 23:46:00 +0000 Subject: [PATCH] small changes to eliminate VC++ warnings. --- Cantera/src/units.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cantera/src/units.h b/Cantera/src/units.h index c32029408..c86d981d4 100644 --- a/Cantera/src/units.h +++ b/Cantera/src/units.h @@ -55,7 +55,7 @@ namespace Cantera { doublereal f = 1.0, fctr; int tsize; string u = units, tok, tsub; - int k; + string::size_type k; char action = '-'; while (1 > 0) { @@ -63,11 +63,11 @@ namespace Cantera { // get token consisting of all characters up to the next // dash, slash, or the end of the string k = u.find_first_of("/-"); - if (k >= 0) + if (k != string::npos) tok = u.substr(0,k); else tok = u; - tsize = tok.size(); + tsize = static_cast(tok.size()); if (tsize == 0) fctr = 1.0; else if (tok[tsize - 1] == '2') {