[Libreoffice-commits] core.git: editeng/source

Stephan Bergmann sbergman at redhat.com
Fri Apr 13 09:43:38 UTC 2018


 editeng/source/editeng/editeng.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f0b3e2241e05472ad84bb9a2a7f9b7142ec54863
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 13 10:32:45 2018 +0200

    -Werror,-Wreturn-std-move
    
    ("local variable 'aFont' will be copied despite being returned by name"; emitted
    by Clang trunk)
    
    Change-Id: I4c876ec5b92b55ae5d1cc72a0e993d96d88c8071
    Reviewed-on: https://gerrit.libreoffice.org/52812
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 0b0305ab06cc..d09e37dd4952 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -18,6 +18,8 @@
  */
 
 #include <memory>
+#include <utility>
+
 #include <comphelper/lok.hxx>
 #include <vcl/wrkwin.hxx>
 #include <vcl/dialog.hxx>
@@ -2648,7 +2650,7 @@ vcl::Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, SvtScri
 {
     SvxFont aFont;
     CreateFont( aFont, rItemSet, true, nScriptType );
-    return aFont;
+    return std::move(aFont);
 }
 
 SvxFont EditEngine::CreateSvxFontFromItemSet( const SfxItemSet& rItemSet )


More information about the Libreoffice-commits mailing list