diff options
author | Brad King <brad.king@kitware.com> | 2005-04-15 12:25:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-04-15 12:25:53 (GMT) |
commit | d3a69766df78d4ee0186a592c05952280f043d3a (patch) | |
tree | 7818522adb5c17d6bf77b3ec149278ee80630111 | |
parent | 5cbd066116ab8ffff746a355ae316133b8440498 (diff) | |
download | CMake-d3a69766df78d4ee0186a592c05952280f043d3a.zip CMake-d3a69766df78d4ee0186a592c05952280f043d3a.tar.gz CMake-d3a69766df78d4ee0186a592c05952280f043d3a.tar.bz2 |
COMP: Removed extra variable initializations to avoid Borland warnings.
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 235e4f6..c3b79df 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -1180,13 +1180,12 @@ int SystemTools::EstimateFormatLength(const char *format, va_list ap) // convert windows slashes to unix slashes void SystemTools::ConvertToUnixSlashes(kwsys_stl::string& path) { - kwsys_stl::string::size_type pos = 0; const char* pathCString = path.c_str(); bool hasDoubleSlash = false; const char* pos0 = pathCString; const char* pos1 = pathCString+1; - for ( pos = 0; *pos0; ++ pos ) + for (kwsys_stl::string::size_type pos = 0; *pos0; ++ pos ) { // make sure we don't convert an escaped space to a unix slash if ( *pos0 == '\\' && *pos1 != ' ' ) @@ -1246,7 +1245,7 @@ kwsys_stl::string SystemTools::ConvertToUnixOutputPath(const char* path) kwsys_stl::string ret = path; // remove // except at the beginning might be a cygwin drive - kwsys_stl::string::size_type pos = 1; + kwsys_stl::string::size_type pos; while((pos = ret.find("//", pos)) != kwsys_stl::string::npos) { ret.erase(pos, 1); |