Fixed an error that I recently introduced in using size_types.
This commit is contained in:
parent
a379bae00e
commit
1feff59190
2 changed files with 4 additions and 4 deletions
|
|
@ -86,14 +86,14 @@ namespace Cantera {
|
|||
string name, num, nm;
|
||||
do {
|
||||
ibegin = s.find_first_not_of(", ;\n\t");
|
||||
if (ibegin != string::npos) {
|
||||
if (ibegin != string::npos) {
|
||||
s = s.substr(ibegin,s.size());
|
||||
icolon = s.find(':');
|
||||
iend = s.find_first_of(", ;\n\t");
|
||||
//icomma = s.find(',');
|
||||
if (icolon > 0) {
|
||||
if (icolon != string::npos) {
|
||||
name = s.substr(0, icolon);
|
||||
if (iend > 0) {
|
||||
if (iend != string::npos) {
|
||||
num = s.substr(icolon+1, iend-icolon);
|
||||
s = s.substr(iend+1, s.size());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ namespace Cantera {
|
|||
throw CanteraError("toSI","unknown unit: "+tsub);
|
||||
if (action == '-') f *= fctr;
|
||||
else if (action == '/') f /= fctr;
|
||||
if (k < 0) break;
|
||||
if (k == string::npos) break;
|
||||
action = u[k];
|
||||
u = u.substr(k+1,u.size());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue