From: Arnaud Giersch Date: Tue, 12 Mar 2019 15:01:39 +0000 (+0100) Subject: IIUC return std::move(...) is discouraged. X-Git-Tag: v3_22~115 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3d35f119d529a283de2a39bca8d8034e6086aefc?hp=b42071214875fcd7bc356687f3ebe896d83198c5 IIUC return std::move(...) is discouraged. --- 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