From: Adam C. Emerson Date: Thu, 28 Feb 2019 16:59:36 +0000 (-0500) Subject: msg: Remove pessimizing move X-Git-Tag: v15.0.0~178^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a3581da68cc076e241b926f04976dcd3f4a22dee;p=ceph.git msg: Remove pessimizing move `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 --- diff --git a/src/msg/async/crypto_onwire.cc b/src/msg/async/crypto_onwire.cc index 0fa35cac409..3858091357d 100644 --- a/src/msg/async/crypto_onwire.cc +++ b/src/msg/async/crypto_onwire.cc @@ -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; }