summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestCoverageCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-06-16 18:47:40 (GMT)
committerBrad King <brad.king@kitware.com>2022-07-05 20:34:57 (GMT)
commit1ee5a4a548c62e5c382f3497be82aac36a99e485 (patch)
tree5a95ec119c06a3cac5c83edb5bc4548d929c89e6 /Source/CTest/cmCTestCoverageCommand.cxx
parentfd3ed41109db9682bbdcb5e5d3249b6654322ca6 (diff)
downloadCMake-1ee5a4a548c62e5c382f3497be82aac36a99e485.zip
CMake-1ee5a4a548c62e5c382f3497be82aac36a99e485.tar.gz
CMake-1ee5a4a548c62e5c382f3497be82aac36a99e485.tar.bz2
cmArgumentParser: Avoid allocating copies of keyword strings
Diffstat (limited to 'Source/CTest/cmCTestCoverageCommand.cxx')
-rw-r--r--Source/CTest/cmCTestCoverageCommand.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestCoverageCommand.cxx b/Source/CTest/cmCTestCoverageCommand.cxx
index 7432d08..9351b0b 100644
--- a/Source/CTest/cmCTestCoverageCommand.cxx
+++ b/Source/CTest/cmCTestCoverageCommand.cxx
@@ -4,6 +4,7 @@
#include <set>
+#include <cm/string_view>
#include <cmext/algorithm>
#include <cmext/string_view>
@@ -19,10 +20,10 @@ void cmCTestCoverageCommand::BindArguments()
}
void cmCTestCoverageCommand::CheckArguments(
- std::vector<std::string> const& keywords)
+ std::vector<cm::string_view> const& keywords)
{
this->LabelsMentioned =
- !this->Labels.empty() || cm::contains(keywords, "LABELS");
+ !this->Labels.empty() || cm::contains(keywords, "LABELS"_s);
}
cmCTestGenericHandler* cmCTestCoverageCommand::InitializeHandler()