summaryrefslogtreecommitdiffstats
path: root/Source/cmOutputConverter.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-20 21:11:05 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-20 21:11:05 (GMT)
commitbdaadbdc2b6f7cb9eea1392043f225da85f51b5b (patch)
tree15ee44e7df2978c2fddcfc96b41b913dffe97a47 /Source/cmOutputConverter.cxx
parent191fc3a0f373d262e2f2e5a2ccb07979e227d683 (diff)
downloadCMake-bdaadbdc2b6f7cb9eea1392043f225da85f51b5b.zip
CMake-bdaadbdc2b6f7cb9eea1392043f225da85f51b5b.tar.gz
CMake-bdaadbdc2b6f7cb9eea1392043f225da85f51b5b.tar.bz2
cmOutputConverter: collapse ConvertToOutputForExisting functions
Diffstat (limited to 'Source/cmOutputConverter.cxx')
-rw-r--r--Source/cmOutputConverter.cxx24
1 files changed, 6 insertions, 18 deletions
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index e66158e..03d8376 100644
--- a/Source/cmOutputConverter.cxx
+++ b/Source/cmOutputConverter.cxx
@@ -27,10 +27,12 @@ cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot)
assert(this->StateSnapshot.IsValid());
}
-std::string cmOutputConverter::ConvertToOutputForExistingCommon(
- const std::string& remote, std::string const& result,
- OutputFormat format) const
+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.
@@ -47,16 +49,6 @@ std::string cmOutputConverter::ConvertToOutputForExistingCommon(
}
std::string cmOutputConverter::ConvertToOutputForExisting(
- const std::string& remote, OutputFormat format) const
-{
- // Perform standard conversion.
- std::string result = this->ConvertToOutputFormat(remote, format);
-
- // Consider short-path.
- return this->ConvertToOutputForExistingCommon(remote, result, format);
-}
-
-std::string cmOutputConverter::ConvertToOutputForExisting(
RelativeRoot remote, OutputFormat format) const
{
// The relative root must have a path (i.e. not FULL or NONE)
@@ -66,11 +58,7 @@ std::string cmOutputConverter::ConvertToOutputForExisting(
const char* remotePath = this->GetRelativeRootPath(remote);
assert(remotePath != 0);
- // Perform standard conversion.
- std::string result = this->ConvertToOutputFormat(remotePath, format);
-
- // Consider short-path.
- return this->ConvertToOutputForExistingCommon(remotePath, result, format);
+ return this->ConvertToOutputForExisting(remotePath, format);
}
const char* cmOutputConverter::GetRelativeRootPath(RelativeRoot relroot) const