summaryrefslogtreecommitdiffstats
path: root/basegfx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-27 16:36:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-27 18:20:07 +0200
commitb3c965ccaa896b12b33ff5b7ccea0eb20d560116 (patch)
treea1b9bdee1aa1e0fc61c3d9c5454a8bc0632a68c1 /basegfx
parentDrop useless text width calculation (diff)
downloadcore-b3c965ccaa896b12b33ff5b7ccea0eb20d560116.tar.gz
core-b3c965ccaa896b12b33ff5b7ccea0eb20d560116.zip
clang-tidy modernize-pass-by-value in basegfx
Change-Id: I1ec34b2f0e9869a82894795f1d6351189ae92d9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135043 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dpolypolygoncutter.cxx5
-rw-r--r--basegfx/source/tools/b2dclipstate.cxx5
-rw-r--r--basegfx/source/tools/unopolypolygon.cxx5
3 files changed, 9 insertions, 6 deletions
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index ddec57374649..b548939f3eed 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -28,6 +28,7 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/curve/b2dcubicbezier.hxx>
#include <sal/log.hxx>
+#include <utility>
#include <vector>
#include <algorithm>
@@ -513,8 +514,8 @@ namespace basegfx
impSolve();
}
- explicit solver(const B2DPolyPolygon& rOriginal, size_t* pPointLimit = nullptr)
- : maOriginal(rOriginal),
+ explicit solver(B2DPolyPolygon aOriginal, size_t* pPointLimit = nullptr)
+ : maOriginal(std::move(aOriginal)),
mbIsCurve(false),
mbChanged(false)
{
diff --git a/basegfx/source/tools/b2dclipstate.cxx b/basegfx/source/tools/b2dclipstate.cxx
index 7b8309e0de1c..126235699b4b 100644
--- a/basegfx/source/tools/b2dclipstate.cxx
+++ b/basegfx/source/tools/b2dclipstate.cxx
@@ -26,6 +26,7 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
+#include <utility>
namespace basegfx::utils
@@ -39,8 +40,8 @@ namespace basegfx::utils
mePendingOps(UNION)
{}
- explicit ImplB2DClipState( const B2DPolyPolygon& rPoly ) :
- maClipPoly(rPoly),
+ explicit ImplB2DClipState( B2DPolyPolygon aPoly ) :
+ maClipPoly(std::move(aPoly)),
mePendingOps(UNION)
{}
diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx
index ce61a5d3451b..76341e6ea532 100644
--- a/basegfx/source/tools/unopolypolygon.cxx
+++ b/basegfx/source/tools/unopolypolygon.cxx
@@ -28,13 +28,14 @@
#include <basegfx/utils/unopolypolygon.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <utility>
using namespace ::com::sun::star;
namespace basegfx::unotools
{
- UnoPolyPolygon::UnoPolyPolygon( const B2DPolyPolygon& rPolyPoly ) :
- maPolyPoly( rPolyPoly ),
+ UnoPolyPolygon::UnoPolyPolygon( B2DPolyPolygon aPolyPoly ) :
+ maPolyPoly(std::move( aPolyPoly )),
meFillRule( rendering::FillRule_EVEN_ODD )
{
// or else races will haunt us.