vcl/source/gdi/pdfwriter_impl.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f0a6c9c7da2f0393bdde2729565b2458d1ff6c5a
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Aug 23 23:08:56 2023 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Aug 24 07:05:50 2023 +0200

    vcl: Fix gcc 13.2 build (vcl::PDFWriterImpl::emitType3Font)
    
    Fix this build failure seen with a gcc 13.2.0 `--enable-werror`
    build on Debian testing:
    
        .../vcl/source/gdi/pdfwriter_impl.cxx: In member function ‘bool 
vcl::PDFWriterImpl::emitType3Font(const vcl::font::PhysicalFontFace*, const 
vcl::pdf::FontSubset&, std::__debug::map<int, int>&)’:
        .../vcl/source/gdi/pdfwriter_impl.cxx:2719:47: error: moving a 
temporary object prevents copy elision [-Werror=pessimizing-move]
         2719 |                 BitmapEx aBitmapEx = std::move(aReader.read());
              |                                      ~~~~~~~~~^~~~~~~~~~~~~~~~
        .../vcl/source/gdi/pdfwriter_impl.cxx:2719:47: note: remove ‘std::move’ 
call
        cc1plus: all warnings being treated as errors
        make[1]: *** [.../solenv/gbuild/LinkTarget.mk:337: 
.../workdir/CxxObject/vcl/source/gdi/pdfwriter_impl.o] Error 1
    
    Change-Id: I9f0ba1afd0dee2a8aaa4708672c755ab3a97e5a2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156021
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index bf118a33d22f..55ed6d514b9d 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2716,7 +2716,7 @@ bool PDFWriterImpl::emitType3Font(const 
vcl::font::PhysicalFontFace* pFace,
 
                 // When rendering an image with an alpha mask during PDF
                 // export, the alpha mask needs to be inverted
-                BitmapEx aBitmapEx = std::move(aReader.read());
+                BitmapEx aBitmapEx = aReader.read();
                 if ( aBitmapEx.IsAlpha())
                 {
                     AlphaMask aAlpha = aBitmapEx.GetAlphaMask();

Reply via email to