From 2f19e53705a6e60af37964c146a742d845f84870 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Sun, 28 Jul 2019 16:03:59 +0200 Subject: cmSystemTool: Let HelpFileName accept a cm::string_view --- Source/cmSystemTools.cxx | 3 ++- Source/cmSystemTools.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 3715cc6..de68bf4 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -189,8 +189,9 @@ std::string cmSystemTools::EscapeQuotes(cm::string_view str) return result; } -std::string cmSystemTools::HelpFileName(std::string name) +std::string cmSystemTools::HelpFileName(cm::string_view str) { + std::string name(str); cmSystemTools::ReplaceString(name, "<", ""); cmSystemTools::ReplaceString(name, ">", ""); return name; diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 8b60dcd..46eab57 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -81,7 +81,7 @@ public: static std::string EscapeQuotes(cm::string_view str); /** Map help document name to file name. */ - static std::string HelpFileName(std::string); + static std::string HelpFileName(cm::string_view); /** * Returns a string that has whitespace removed from the start and the end. -- cgit v0.12