From c89580487b38d365dad56afea587f698ae101947 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 7 Apr 2022 13:53:03 -0400 Subject: cmTarget: pass candidate strings by const-ref This avoids having to copy the `std::string` overload. --- Source/cmTarget.cxx | 6 +++--- 1 file 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 value) } template -bool StringIsEmpty(ValueType value); +bool StringIsEmpty(ValueType const& value); template <> -bool StringIsEmpty(const char* value) +bool StringIsEmpty(const char* const& value) { return cmValue::IsEmpty(value); } template <> -bool StringIsEmpty(cmValue value) +bool StringIsEmpty(cmValue const& value) { return value.IsEmpty(); } -- cgit v0.12