diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-07-28 12:44:05 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-07-28 15:47:26 (GMT) |
commit | a929255dec9e46ccc27d7b44d000a2e568cbfd99 (patch) | |
tree | de62bca6eb968bc84231e762ba5f566fae13a3bc | |
parent | 1b30b28c042660c37f24d11a804ea697ea8601ef (diff) | |
download | CMake-a929255dec9e46ccc27d7b44d000a2e568cbfd99.zip CMake-a929255dec9e46ccc27d7b44d000a2e568cbfd99.tar.gz CMake-a929255dec9e46ccc27d7b44d000a2e568cbfd99.tar.bz2 |
cmOutputConverter: Let cmOutputConverterIsShellOperator accept cm::string_view
-rw-r--r-- | Source/cmOutputConverter.cxx | 4 | ||||
-rw-r--r-- | Source/cmOutputConverter.h | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 132fdeb..bd5dffe 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -53,9 +53,9 @@ std::string cmOutputConverter::ConvertToOutputFormat(const std::string& source, } std::string cmOutputConverter::ConvertDirectorySeparatorsForShell( - const std::string& source) const + cm::string_view source) const { - std::string result = source; + std::string result(source); // For the MSYS shell convert drive letters to posix paths, so // that c:/some/path becomes /c/some/path. This is needed to // avoid problems with the shell path translation. diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index fe39fe6..988911d 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -25,8 +25,7 @@ public: }; std::string ConvertToOutputFormat(const std::string& source, OutputFormat output) const; - std::string ConvertDirectorySeparatorsForShell( - const std::string& source) const; + std::string ConvertDirectorySeparatorsForShell(cm::string_view source) const; //! for existing files convert to output path and short path if spaces std::string ConvertToOutputForExisting(const std::string& remote, |