diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-21 17:59:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-21 21:55:31 +0200 |
commit | 08f757c32fc260c8857c1ff5cd44baf9aa8b8d03 (patch) | |
tree | 64324a10e445ea83252ff8ac64cb58476fb6a2cc /canvas/source/opengl | |
parent | 098df8583bc8d4a8d0210525f05f69b460386a46 (diff) |
clang-tidy modernize-pass-by-value in canvas
Change-Id: Ib6e1b6182d83b09dbf5e2aeb9cf3e4ca11d9f48b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134712
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas/source/opengl')
-rw-r--r-- | canvas/source/opengl/ogl_canvasbitmap.cxx | 6 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_canvasbitmap.hxx | 6 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_canvasfont.cxx | 5 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_canvasfont.hxx | 4 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_textlayout.cxx | 13 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_textlayout.hxx | 8 |
6 files changed, 23 insertions, 19 deletions
diff --git a/canvas/source/opengl/ogl_canvasbitmap.cxx b/canvas/source/opengl/ogl_canvasbitmap.cxx index 2a476ec91e58..fa5e53823d8d 100644 --- a/canvas/source/opengl/ogl_canvasbitmap.cxx +++ b/canvas/source/opengl/ogl_canvasbitmap.cxx @@ -11,6 +11,8 @@ #include <tools/diagnose_ex.h> +#include <utility> + #include "ogl_canvasbitmap.hxx" @@ -19,9 +21,9 @@ using namespace ::com::sun::star; namespace oglcanvas { CanvasBitmap::CanvasBitmap( const geometry::IntegerSize2D& rSize, - const SpriteCanvasRef& rDevice, + SpriteCanvasRef rDevice, SpriteDeviceHelper& rDeviceHelper ) : - mpDevice( rDevice ) + mpDevice(std::move( rDevice )) { ENSURE_OR_THROW( mpDevice.is(), "CanvasBitmap::CanvasBitmap(): Invalid surface or device" ); diff --git a/canvas/source/opengl/ogl_canvasbitmap.hxx b/canvas/source/opengl/ogl_canvasbitmap.hxx index 55564c66d018..5cc41bb192bc 100644 --- a/canvas/source/opengl/ogl_canvasbitmap.hxx +++ b/canvas/source/opengl/ogl_canvasbitmap.hxx @@ -46,9 +46,9 @@ namespace oglcanvas @param rDevice Reference device, with which bitmap should be compatible */ - CanvasBitmap( const css::geometry::IntegerSize2D& rSize, - const SpriteCanvasRef& rDevice, - SpriteDeviceHelper& rDeviceHelper ); + CanvasBitmap( const css::geometry::IntegerSize2D& rSize, + SpriteCanvasRef rDevice, + SpriteDeviceHelper& rDeviceHelper ); /** Create verbatim copy (including all recorded actions) */ diff --git a/canvas/source/opengl/ogl_canvasfont.cxx b/canvas/source/opengl/ogl_canvasfont.cxx index 764b848cfa83..7309b9acd279 100644 --- a/canvas/source/opengl/ogl_canvasfont.cxx +++ b/canvas/source/opengl/ogl_canvasfont.cxx @@ -11,6 +11,7 @@ #include <com/sun/star/rendering/FontMetrics.hpp> #include <canvas/canvastools.hxx> +#include <utility> #include "ogl_canvasfont.hxx" #include "ogl_textlayout.hxx" @@ -19,11 +20,11 @@ using namespace ::com::sun::star; namespace oglcanvas { - CanvasFont::CanvasFont( const rendering::FontRequest& rFontRequest, + CanvasFont::CanvasFont( rendering::FontRequest aFontRequest, const uno::Sequence< beans::PropertyValue >& extraFontProperties, const geometry::Matrix2D& fontMatrix ) : CanvasFontBaseT( m_aMutex ), - maFontRequest( rFontRequest ), + maFontRequest(std::move( aFontRequest )), mnEmphasisMark(0), maFontMatrix( fontMatrix ) { diff --git a/canvas/source/opengl/ogl_canvasfont.hxx b/canvas/source/opengl/ogl_canvasfont.hxx index 75eda6b0fb31..13b0f78a9d68 100644 --- a/canvas/source/opengl/ogl_canvasfont.hxx +++ b/canvas/source/opengl/ogl_canvasfont.hxx @@ -36,9 +36,9 @@ namespace oglcanvas CanvasFont(const CanvasFont&) = delete; const CanvasFont& operator=(const CanvasFont&) = delete; - CanvasFont( const css::rendering::FontRequest& fontRequest, + CanvasFont( css::rendering::FontRequest fontRequest, const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties, - const css::geometry::Matrix2D& fontMatrix ); + const css::geometry::Matrix2D& fontMatrix ); // XCanvasFont virtual css::uno::Reference< css::rendering::XTextLayout > SAL_CALL createTextLayout( const css::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) override; diff --git a/canvas/source/opengl/ogl_textlayout.cxx b/canvas/source/opengl/ogl_textlayout.cxx index 41962c8b1ea0..5eab3d9bcf13 100644 --- a/canvas/source/opengl/ogl_textlayout.cxx +++ b/canvas/source/opengl/ogl_textlayout.cxx @@ -9,6 +9,7 @@ #include <sal/config.h> #include <sal/log.hxx> +#include <utility> #include <tools/diagnose_ex.h> @@ -18,13 +19,13 @@ using namespace ::com::sun::star; namespace oglcanvas { - TextLayout::TextLayout( const rendering::StringContext& aText, - sal_Int8 nDirection, - sal_Int64 /*nRandomSeed*/, - const CanvasFont::ImplRef& rFont ) : + TextLayout::TextLayout( rendering::StringContext aText, + sal_Int8 nDirection, + sal_Int64 /*nRandomSeed*/, + CanvasFont::ImplRef rFont ) : TextLayoutBaseT( m_aMutex ), - maText( aText ), - mpFont( rFont ), + maText(std::move( aText )), + mpFont(std::move( rFont )), mnTextDirection( nDirection ) { } diff --git a/canvas/source/opengl/ogl_textlayout.hxx b/canvas/source/opengl/ogl_textlayout.hxx index f2e6869c466d..ce7b1958993e 100644 --- a/canvas/source/opengl/ogl_textlayout.hxx +++ b/canvas/source/opengl/ogl_textlayout.hxx @@ -27,10 +27,10 @@ namespace oglcanvas public TextLayoutBaseT { public: - TextLayout( const css::rendering::StringContext& aText, - sal_Int8 nDirection, - sal_Int64 nRandomSeed, - const CanvasFont::ImplRef& rFont ); + TextLayout( css::rendering::StringContext aText, + sal_Int8 nDirection, + sal_Int64 nRandomSeed, + CanvasFont::ImplRef rFont ); /// make noncopyable TextLayout(const TextLayout&) = delete; |