From d3a69766df78d4ee0186a592c05952280f043d3a Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 15 Apr 2005 08:25:53 -0400 Subject: COMP: Removed extra variable initializations to avoid Borland warnings. --- Source/kwsys/SystemTools.cxx | 5 ++--- 1 file 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); -- cgit v0.12