summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-08-22 19:50:28 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-08-22 19:50:28 +0100
commit4653a46e8208436baa7fea871c3948b1186bcd2c (patch)
tree8c5b097d34136fb28c9a47e9ee6faccbbb06b6a5
parentCreate Optional ModelParts on the stack with std::optional (diff)
downloadslicer-4653a46e8208436baa7fea871c3948b1186bcd2c.tar.bz2
slicer-4653a46e8208436baa7fea871c3948b1186bcd2c.tar.xz
slicer-4653a46e8208436baa7fea871c3948b1186bcd2c.zip
Add a copying to_lower wrapper
-rw-r--r--slicer/slicer/hookMap.cpp6
-rw-r--r--slicer/slicer/hookMap.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/slicer/slicer/hookMap.cpp b/slicer/slicer/hookMap.cpp
index 3192d6c..c32db2d 100644
--- a/slicer/slicer/hookMap.cpp
+++ b/slicer/slicer/hookMap.cpp
@@ -7,4 +7,10 @@ namespace Slicer {
{
boost::algorithm::to_lower(s);
}
+
+ std::string
+ to_lower_copy(const std::string & s)
+ {
+ return boost::algorithm::to_lower_copy(s);
+ }
}
diff --git a/slicer/slicer/hookMap.h b/slicer/slicer/hookMap.h
index daef5b0..3328ddd 100644
--- a/slicer/slicer/hookMap.h
+++ b/slicer/slicer/hookMap.h
@@ -11,6 +11,7 @@
namespace Slicer {
void DLL_PUBLIC to_lower(std::string & s);
+ [[nodiscard]] std::string DLL_PUBLIC to_lower_copy(const std::string & s);
template<typename T> class ModelPartForComplex; // IWYU pragma: keep