summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-04-07 17:53:03 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-04-25 18:29:17 (GMT)
commitc89580487b38d365dad56afea587f698ae101947 (patch)
tree3150fb713695776dfc164307960eb9aff5e06397 /Source
parent64ea1a272c87fda1de948d69130c7872ff01c39e (diff)
downloadCMake-c89580487b38d365dad56afea587f698ae101947.zip
CMake-c89580487b38d365dad56afea587f698ae101947.tar.gz
CMake-c89580487b38d365dad56afea587f698ae101947.tar.bz2
cmTarget: pass candidate strings by const-ref
This avoids having to copy the `std::string` overload.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a01321d..e85cc33 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1227,16 +1227,16 @@ std::string ConvertToString<cmValue>(cmValue value)
}
template <typename ValueType>
-bool StringIsEmpty(ValueType value);
+bool StringIsEmpty(ValueType const& value);
template <>
-bool StringIsEmpty<const char*>(const char* value)
+bool StringIsEmpty<const char*>(const char* const& value)
{
return cmValue::IsEmpty(value);
}
template <>
-bool StringIsEmpty<cmValue>(cmValue value)
+bool StringIsEmpty<cmValue>(cmValue const& value)
{
return value.IsEmpty();
}