summaryrefslogtreecommitdiffstats
path: root/Source/cmOutputConverter.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-20 21:18:59 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-20 21:18:59 (GMT)
commit8ddbd4c2806f3064f734377b48ec77131f6836dc (patch)
treeff8a457ed00d8dc3a8c86705b903ea5fbeed7dcf /Source/cmOutputConverter.cxx
parentbdaadbdc2b6f7cb9eea1392043f225da85f51b5b (diff)
downloadCMake-8ddbd4c2806f3064f734377b48ec77131f6836dc.zip
CMake-8ddbd4c2806f3064f734377b48ec77131f6836dc.tar.gz
CMake-8ddbd4c2806f3064f734377b48ec77131f6836dc.tar.bz2
cmOutputConverter: remove unnecessary conversion
Diffstat (limited to 'Source/cmOutputConverter.cxx')
-rw-r--r--Source/cmOutputConverter.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index 03d8376..b92c074 100644
--- a/Source/cmOutputConverter.cxx
+++ b/Source/cmOutputConverter.cxx
@@ -30,13 +30,11 @@ cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot)
std::string cmOutputConverter::ConvertToOutputForExisting(
const std::string& remote, OutputFormat format) const
{
- // Perform standard conversion.
- std::string result = this->ConvertToOutputFormat(remote, format);
-
// If this is a windows shell, the result has a space, and the path
// already exists, we can use a short-path to reference it without a
// space.
- if (this->GetState()->UseWindowsShell() && result.find(' ') != result.npos &&
+ if (this->GetState()->UseWindowsShell() &&
+ remote.find(' ') != std::string::npos &&
cmSystemTools::FileExists(remote.c_str())) {
std::string tmp;
if (cmSystemTools::GetShortPath(remote, tmp)) {
@@ -44,8 +42,8 @@ std::string cmOutputConverter::ConvertToOutputForExisting(
}
}
- // Otherwise, leave it unchanged.
- return result;
+ // Otherwise, perform standard conversion.
+ return this->ConvertToOutputFormat(remote, format);
}
std::string cmOutputConverter::ConvertToOutputForExisting(