From fd7f8b6db33bee87a1bd6bca9ce072425cb50a7c Mon Sep 17 00:00:00 2001 From: Dwordcito Date: Thu, 22 Sep 2022 02:14:43 -0300 Subject: [PATCH] Moving a local object in a return statement prevents copy elision. --- include/mysqlx/common/util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mysqlx/common/util.h b/include/mysqlx/common/util.h index 3a252df6..43b9ba6b 100644 --- a/include/mysqlx/common/util.h +++ b/include/mysqlx/common/util.h @@ -337,7 +337,7 @@ std::string to_upper(const std::string &val) std::string uc_val; uc_val.resize(val.size()); transform(val.begin(), val.end(), uc_val.begin(), ::toupper); - return std::move(uc_val); + return uc_val; } inline @@ -348,7 +348,7 @@ std::string to_lower(const std::string &val) std::string uc_val; uc_val.resize(val.size()); transform(val.begin(), val.end(), uc_val.begin(), ::tolower); - return std::move(uc_val); + return uc_val; } } // common