[Libreoffice-commits] online.git: loolwsd/MessageQueue.cpp

Miklos Vajna vmiklos at collabora.co.uk
Tue Mar 29 11:37:24 UTC 2016


 loolwsd/MessageQueue.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 89f79a1bf48c26ba292fcb8490def4e899e23a6b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Mar 29 13:36:30 2016 +0200

    MessageQueue: moving a local object in a return statement prevents copy elision
    
    As pointed out by clang -Wpessimizing-move.

diff --git a/loolwsd/MessageQueue.cpp b/loolwsd/MessageQueue.cpp
index 61acb20..2dd57db 100644
--- a/loolwsd/MessageQueue.cpp
+++ b/loolwsd/MessageQueue.cpp
@@ -57,7 +57,7 @@ MessageQueue::Payload MessageQueue::get_impl()
 {
     auto result = _queue.front();
     _queue.pop_front();
-    return std::move(result);
+    return result;
 }
 
 void MessageQueue::clear_impl()


More information about the Libreoffice-commits mailing list