diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-07-23 13:06:48 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-07-23 13:06:48 (GMT) |
commit | dddbad259c5d497987cbb367ce184f3953f2f137 (patch) | |
tree | 76ce09dea60fff3d5523dc47e4dc2d39b1410b43 /Source/cmLocalGenerator.cxx | |
parent | 21c14ca2bca12e90ded1be354bc48e9d98acc643 (diff) | |
download | CMake-dddbad259c5d497987cbb367ce184f3953f2f137.zip CMake-dddbad259c5d497987cbb367ce184f3953f2f137.tar.gz CMake-dddbad259c5d497987cbb367ce184f3953f2f137.tar.bz2 |
PERF: micro optimization: the (*pos1) && (*pos1=='/') were redundant, and
hasDoubleSlash is false in most cases, so in most cases 3 comparisons were
done, now only one
Alex
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9d2ef54..bcf89e1 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2193,13 +2193,12 @@ std::string cmLocalGenerator::Convert(const char* source, break; } } - // Now convert it to an output path. if (output == MAKEFILE) { result = cmSystemTools::ConvertToOutputPath(result.c_str()); } - if( output == SHELL) + else if( output == SHELL) { // For the MSYS shell convert drive letters to posix paths, so // that c:/some/path becomes /c/some/path. This is needed to @@ -2298,9 +2297,8 @@ static bool cmLocalGeneratorNotAbove(const char* a, const char* b) //---------------------------------------------------------------------------- std::string -cmLocalGenerator -::ConvertToRelativePath(const std::vector<std::string>& local, - const char* in_remote) +cmLocalGenerator::ConvertToRelativePath(const std::vector<std::string>& local, + const char* in_remote) { // The path should never be quoted. assert(in_remote[0] != '\"'); |