From 40e19048c8b1945ab5da981478dde63d55122996 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Thu, 8 Jul 2004 18:09:22 +0000 Subject: [PATCH] Fixed an error that I recently introduced in using size_types --- Cantera/src/misc.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Cantera/src/misc.cpp b/Cantera/src/misc.cpp index 9f4e94505..a9d4a5a55 100755 --- a/Cantera/src/misc.cpp +++ b/Cantera/src/misc.cpp @@ -117,6 +117,9 @@ namespace Cantera { string ext; if (idot != string::npos) { ext = path.substr(idot, path.size()); + } else { + ext = ""; + idot = path.size(); } if (ext != ".xml" && ext != ".ctml") { /* @@ -322,11 +325,6 @@ namespace Cantera { #ifdef CANTERA_DATA string datadir = string(CANTERA_DATA); dirs.push_back(datadir); -#endif -#ifdef DEBUG_HKM - for (int i = 0; i < static_cast(dirs.size()); i++) { - cout << "default dir " << i << " = " << dirs[i] << endl; - } #endif } @@ -365,14 +363,14 @@ namespace Cantera { */ string findInputFile(string name) { appinit(); - string::size_type islash = name.find('/'); - string::size_type ibslash = name.find('\\'); + string::size_type islash = name.find('/'); + string::size_type ibslash = name.find('\\'); string inname; vector& dirs = __app->inputDirs; if (dirs.size() == 0) setDefaultDirectories(); int nd; - if (islash == string::npos && ibslash == string::npos) { + if (islash == string::npos && ibslash == string::npos) { nd = static_cast(dirs.size()); int i; inname = "";