From 6c4af3c55e5c5bb2c7992d4ca8f2f74463b5c655 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 25 Oct 2016 16:25:39 +0800 Subject: [PATCH] common/cmdparse,msg/async: remove unnecessary std::move() Signed-off-by: Kefu Chai --- src/common/cmdparse.cc | 2 +- src/msg/async/PosixStack.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/cmdparse.cc b/src/common/cmdparse.cc index 51e67e389964c..b1e05a7c123cc 100644 --- a/src/common/cmdparse.cc +++ b/src/common/cmdparse.cc @@ -250,7 +250,7 @@ cmdmap_from_json(vector cmd, map *mapp, stringstrea // if an empty array is acceptable, the caller should always check for // vector if the expected value of "vector" in the // cmdmap is missing. - (*mapp)[it->first] = std::move(vector()); + (*mapp)[it->first] = vector(); } else if (spvals.front().type() == json_spirit::str_type) { vector outv; for (const auto& sv : spvals) { diff --git a/src/msg/async/PosixStack.h b/src/msg/async/PosixStack.h index 149db320d8df2..f0f29d436325d 100644 --- a/src/msg/async/PosixStack.h +++ b/src/msg/async/PosixStack.h @@ -50,7 +50,7 @@ class PosixNetworkStack : public NetworkStack { } virtual void spawn_worker(unsigned i, std::function &&func) override { threads.resize(i+1); - threads[i] = std::move(std::thread(func)); + threads[i] = std::thread(func); } virtual void join_worker(unsigned i) override { assert(threads.size() > i && threads[i].joinable()); -- 2.39.5