From 504aacd2442383e763c39e54a93e0221f944f905 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 5 Dec 2020 16:18:15 -0500 Subject: [PATCH] Revert "[clang-tidy] Pass by value with std::move" This reverts commit e46039efb190806b37b533f4ddd6ecd31896245b. --- src/Variant.cpp | 5 ++--- src/Variant.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Variant.cpp b/src/Variant.cpp index b755d7d04..d0afa4234 100644 --- a/src/Variant.cpp +++ b/src/Variant.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -128,9 +127,9 @@ Variant::Variant (const double value) } //////////////////////////////////////////////////////////////////////////////// -Variant::Variant (std::string value) +Variant::Variant (const std::string& value) : _type (Variant::type_string) -, _string (std::move(value)) +, _string (value) { } diff --git a/src/Variant.h b/src/Variant.h index 748830da8..05f1f575b 100644 --- a/src/Variant.h +++ b/src/Variant.h @@ -47,7 +47,7 @@ public: Variant (const bool); Variant (const int); Variant (const double); - Variant (std::string ); + Variant (const std::string&); Variant (const char*); Variant (const time_t, const enum type);