summaryrefslogtreecommitdiffstats
path: root/Source/cmAlgorithms.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAlgorithms.h')
-rw-r--r--Source/cmAlgorithms.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h
index 22f69fa..7c683ad 100644
--- a/Source/cmAlgorithms.h
+++ b/Source/cmAlgorithms.h
@@ -242,7 +242,7 @@ std::string cmJoin(Range const& r, const char* delimiter)
}
template <typename Range>
-std::string cmJoin(Range const& r, std::string delimiter)
+std::string cmJoin(Range const& r, std::string const& delimiter)
{
return cmJoin(r, delimiter.c_str());
}
@@ -344,13 +344,13 @@ typename Range::const_iterator cmRemoveDuplicates(Range& r)
}
template <typename Range>
-std::string cmWrap(std::string prefix, Range const& r, std::string suffix,
- std::string sep)
+std::string cmWrap(std::string const& prefix, Range const& r,
+ std::string const& suffix, std::string const& sep)
{
if (r.empty()) {
return std::string();
}
- return prefix + cmJoin(r, (suffix + sep + prefix).c_str()) + suffix;
+ return prefix + cmJoin(r, suffix + sep + prefix) + suffix;
}
template <typename Range>