Browse Source

cmLocalGenerator: Convert loop to algorithm.

Stephen Kelly 10 years ago
parent
commit
b3a0c6e08f
1 changed files with 1 additions and 6 deletions
  1. 1 6
      Source/cmLocalGenerator.cxx

+ 1 - 6
Source/cmLocalGenerator.cxx

@@ -2800,12 +2800,7 @@ std::string cmLocalGenerator::ConvertToOutputFormat(const std::string& source,
       }
     if(this->WindowsShell)
       {
-      std::string::size_type pos = 0;
-      while((pos = result.find('/', pos)) != std::string::npos)
-        {
-        result[pos] = '\\';
-        pos++;
-        }
+      std::replace(result.begin(), result.end(), '/', '\\');
       }
     result = this->EscapeForShell(result, true, false, output == WATCOMQUOTE);
     }