]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg: Remove pessimizing move
authorAdam C. Emerson <aemerson@redhat.com>
Thu, 28 Feb 2019 16:59:36 +0000 (11:59 -0500)
committerAdam C. Emerson <aemerson@redhat.com>
Fri, 15 Mar 2019 18:52:47 +0000 (14:52 -0400)
`std::move` in the return statement of a local variable prevents copy
elision, which is the exact opposite of what you want.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/msg/async/crypto_onwire.cc

index 0fa35cac409650eb079e598814f28c2ff7ac3d42..3858091357d2f8a1eb4e7e3b691feb22e38a0862 100644 (file)
@@ -225,7 +225,7 @@ ceph::bufferlist AES128GCM_OnWireRxHandler::authenticated_decrypt_update(
 
   ceph::bufferlist outbl;
   outbl.push_back(std::move(plainnode));
-  return std::move(outbl);
+  return outbl;
 }