From: Adam C. Emerson Date: Mon, 10 Apr 2017 17:02:43 +0000 (-0400) Subject: msg: Remove pessimizing move X-Git-Tag: v12.0.2~94^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=568d60631c15dd437e96ad5cb6f8fe5a78d6c9e9;p=ceph.git msg: Remove pessimizing move Do not std::move the result of a function returning a value. (Once could reasonably std::move the result of a function returning an lvalue reference, but *not* that of one returning a value.) Signed-off-by: Adam C. Emerson --- diff --git a/src/msg/async/rdma/RDMAStack.cc b/src/msg/async/rdma/RDMAStack.cc index 443ac7fa4488..66c7e5634abc 100644 --- a/src/msg/async/rdma/RDMAStack.cc +++ b/src/msg/async/rdma/RDMAStack.cc @@ -526,7 +526,7 @@ RDMAStack::~RDMAStack() void RDMAStack::spawn_worker(unsigned i, std::function &&func) { threads.resize(i+1); - threads[i] = std::move(std::thread(func)); + threads[i] = std::thread(func); } void RDMAStack::join_worker(unsigned i)