From 3d35f119d529a283de2a39bca8d8034e6086aefc Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 12 Mar 2019 16:01:39 +0100 Subject: [PATCH 1/1] IIUC return std::move(...) is discouraged. --- include/simgrid/kernel/future.hpp | 4 ++-- include/xbt/config.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/simgrid/kernel/future.hpp b/include/simgrid/kernel/future.hpp index b006a5ebe9..374d0ee650 100644 --- a/include/simgrid/kernel/future.hpp +++ b/include/simgrid/kernel/future.hpp @@ -157,7 +157,7 @@ public: xbt_assert(this->value_); auto result = std::move(this->value_.get()); this->value_ = boost::optional(); - return std::move(result); + return result; } private: @@ -426,7 +426,7 @@ template Future unwrap_future(Future> future) Promise promise; Future result = promise.get_future(); bind_promise(std::move(promise), std::move(future)); - return std::move(result); + return result; } /** Producer side of a @ref simgrid::kernel::Future diff --git a/include/xbt/config.hpp b/include/xbt/config.hpp index b6f60f00f6..1a04a570f9 100644 --- a/include/xbt/config.hpp +++ b/include/xbt/config.hpp @@ -41,7 +41,7 @@ inline std::string const& to_string(std::string const& value) } inline std::string to_string(std::string&& value) { - return std::move(value); + return value; } // Set default -- 2.20.1