From: Kefu Chai Date: Tue, 25 Oct 2016 08:25:39 +0000 (+0800) Subject: common/cmdparse,msg/async: remove unnecessary std::move() X-Git-Tag: v11.1.0~500^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F11638%2Fhead;p=ceph.git common/cmdparse,msg/async: remove unnecessary std::move() Signed-off-by: Kefu Chai --- diff --git a/src/common/cmdparse.cc b/src/common/cmdparse.cc index 51e67e389964..b1e05a7c123c 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 149db320d8df..f0f29d436325 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());