[Libreoffice-commits] online.git: loolwsd/Log.hpp

Miklos Vajna vmiklos at collabora.co.uk
Tue Aug 2 07:29:46 UTC 2016


 loolwsd/Log.hpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 195b72a9212f27171f0df5a459d6b24ba046c626
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Aug 2 09:29:19 2016 +0200

    Log: use std::move() when a value is passed
    
    No move would actually happen in the second case.
    
    Change-Id: I7cc7d9e2a55a17d19845e98a0d829b168b614529

diff --git a/loolwsd/Log.hpp b/loolwsd/Log.hpp
index cc43baa..e404d76 100644
--- a/loolwsd/Log.hpp
+++ b/loolwsd/Log.hpp
@@ -48,12 +48,12 @@ namespace Log
     {
         public:
             StreamLogger(std::function<void(const std::string&)> func)
-              : _func(func)
+              : _func(std::move(func))
             {
             }
 
             StreamLogger(StreamLogger&& sl)
-              : _stream(std::move(sl._stream.str()))
+              : _stream(sl._stream.str())
               , _func(std::move(sl._func))
             {
             }


More information about the Libreoffice-commits mailing list