diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-07 17:53:03 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-25 18:29:17 (GMT) |
commit | c89580487b38d365dad56afea587f698ae101947 (patch) | |
tree | 3150fb713695776dfc164307960eb9aff5e06397 /Source | |
parent | 64ea1a272c87fda1de948d69130c7872ff01c39e (diff) | |
download | CMake-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.cxx | 6 |
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(); } |