From: Xinying Song Date: Thu, 27 Jul 2017 07:52:54 +0000 (+0800) Subject: common: use std::move() for better performance X-Git-Tag: v12.1.2~16^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e15b2b9cc8cb2db6f4033bbc06328201380821a0;p=ceph.git common: use std::move() for better performance use std::move() to avoid extra copy constructions in src/common/OutputDataSocket.cc. Signed-off-by: Xinying Song --- diff --git a/src/common/OutputDataSocket.cc b/src/common/OutputDataSocket.cc index f61c9c4453a2..bbee667f329f 100644 --- a/src/common/OutputDataSocket.cc +++ b/src/common/OutputDataSocket.cc @@ -298,8 +298,7 @@ void OutputDataSocket::handle_connection(int fd) int OutputDataSocket::dump_data(int fd) { m_lock.Lock(); - list l; - l = data; + list l = std::move(data); data.clear(); data_size = 0; m_lock.Unlock();