]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/cmdparse,msg/async: remove unnecessary std::move() 11638/head
authorKefu Chai <kchai@redhat.com>
Tue, 25 Oct 2016 08:25:39 +0000 (16:25 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 26 Oct 2016 15:30:22 +0000 (23:30 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/cmdparse.cc
src/msg/async/PosixStack.h

index 51e67e389964c0a4e9dd46d5366d3599de087619..b1e05a7c123cc4786f43ab7b8c6ae8331a0ec913 100644 (file)
@@ -250,7 +250,7 @@ cmdmap_from_json(vector<string> cmd, map<string, cmd_vartype> *mapp, stringstrea
            // if an empty array is acceptable, the caller should always check for
            // vector<string> if the expected value of "vector<int64_t>" in the
            // cmdmap is missing.
-           (*mapp)[it->first] = std::move(vector<string>());
+           (*mapp)[it->first] = vector<string>();
          } else if (spvals.front().type() == json_spirit::str_type) {
            vector<string> outv;
            for (const auto& sv : spvals) {
index 149db320d8df28c2707f45cc9ea8b52114b22196..f0f29d436325de0874ce19daac935b5b9de3413b 100644 (file)
@@ -50,7 +50,7 @@ class PosixNetworkStack : public NetworkStack {
   }
   virtual void spawn_worker(unsigned i, std::function<void ()> &&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());