summaryrefslogtreecommitdiffstats
path: root/Source/cmList.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmList.cxx')
-rw-r--r--Source/cmList.cxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/Source/cmList.cxx b/Source/cmList.cxx
index 022fcd2..28d4791 100644
--- a/Source/cmList.cxx
+++ b/Source/cmList.cxx
@@ -802,32 +802,35 @@ cmList& cmList::transform(TransformAction action,
return *this;
}
-std::string cmList::join(cm::string_view glue) const
-{
- return cmJoin(this->Values, glue);
-}
-
-std::string& cmList::append(std::string& list, cm::string_view value)
+std::string& cmList::append(std::string& list, std::string&& value)
{
if (list.empty()) {
- list = std::string(value);
+ list = std::move(value);
} else {
list += cmStrCat(cmList::element_separator, value);
}
return list;
}
+std::string& cmList::append(std::string& list, cm::string_view value)
+{
+ return cmList::append(list, std::string{ value });
+}
-std::string& cmList::prepend(std::string& list, cm::string_view value)
+std::string& cmList::prepend(std::string& list, std::string&& value)
{
if (list.empty()) {
- list = std::string(value);
+ list = std::move(value);
} else {
list.insert(0, cmStrCat(value, cmList::element_separator));
}
return list;
}
+std::string& cmList::prepend(std::string& list, cm::string_view value)
+{
+ return cmList::prepend(list, std::string{ value });
+}
cmList::size_type cmList::ComputeIndex(index_type pos, bool boundCheck) const
{