summaryrefslogtreecommitdiffstats
path: root/basegfx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 07:36:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 08:39:10 +0200
commit44688e498c9672f0a1759ead394f6d6e0f0ef5fd (patch)
treef2f1b33f882ced5c23c2854177c9b266c907ac56 /basegfx
parentFrame Contextmenu in Writer and other sw apps (diff)
downloadcore-44688e498c9672f0a1759ead394f6d6e0f0ef5fd.tar.gz
core-44688e498c9672f0a1759ead394f6d6e0f0ef5fd.zip
clang-tidy performance-unnecessary-copy-initialization in
basctl..basic Change-Id: I4009282869cd8a2f269093564bd4fafccab80ec3 Reviewed-on: https://gerrit.libreoffice.org/62212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dpolygoncutandtouch.cxx2
-rw-r--r--basegfx/source/polygon/b2dpolygontools.cxx2
-rw-r--r--basegfx/source/polygon/b2dpolygontriangulator.cxx4
-rw-r--r--basegfx/source/polygon/b2dpolypolygoncutter.cxx18
-rw-r--r--basegfx/source/polygon/b2dsvgpolypolygon.cxx2
-rw-r--r--basegfx/source/polygon/b3dpolypolygontools.cxx6
6 files changed, 17 insertions, 17 deletions
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index f34c7bb3a4a2..d878a2801125 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -991,7 +991,7 @@ namespace basegfx
for(sal_uInt32 m(0); m < nCountM; m++)
{
- const B2DPolygon aMask(rPolyMask.getB2DPolygon(m));
+ const B2DPolygon& aMask(rPolyMask.getB2DPolygon(m));
const sal_uInt32 nCountB(aMask.count());
if(nCountB)
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 20b193d099bc..5c8eaa5792a6 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -1451,7 +1451,7 @@ namespace basegfx
bool isInEpsilonRange(const B2DPolygon& rCandidate, const B2DPoint& rTestPosition, double fDistance)
{
// force to non-bezier polygon
- const B2DPolygon aCandidate(rCandidate.getDefaultAdaptiveSubdivision());
+ const B2DPolygon& aCandidate(rCandidate.getDefaultAdaptiveSubdivision());
const sal_uInt32 nPointCount(aCandidate.count());
if(nPointCount)
diff --git a/basegfx/source/polygon/b2dpolygontriangulator.cxx b/basegfx/source/polygon/b2dpolygontriangulator.cxx
index a7041e2053fc..ed58d2f03d27 100644
--- a/basegfx/source/polygon/b2dpolygontriangulator.cxx
+++ b/basegfx/source/polygon/b2dpolygontriangulator.cxx
@@ -220,7 +220,7 @@ namespace basegfx
{
for(sal_uInt32 a(0); a < rCandidate.count(); a++)
{
- const B2DPolygon aPolygonCandidate(rCandidate.getB2DPolygon(a));
+ const B2DPolygon& aPolygonCandidate(rCandidate.getB2DPolygon(a));
const sal_uInt32 nCount(aPolygonCandidate.count());
if(nCount > 2)
@@ -419,7 +419,7 @@ namespace basegfx
if(aCandidate.count() == 1)
{
// single polygon -> single polygon triangulation
- const B2DPolygon aSinglePolygon(aCandidate.getB2DPolygon(0));
+ const B2DPolygon& aSinglePolygon(aCandidate.getB2DPolygon(0));
aRetval = triangulate(aSinglePolygon);
}
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index 4fd7bf369d85..d80c670fe04f 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -535,7 +535,7 @@ namespace basegfx
// count points
for(a = 0; a < nOriginalCount; a++)
{
- const B2DPolygon aCandidate(aGeometry.getB2DPolygon(a));
+ const B2DPolygon& aCandidate(aGeometry.getB2DPolygon(a));
const sal_uInt32 nCandCount(aCandidate.count());
// If it's not a bezier curve, at least three points would be needed to have a
@@ -561,7 +561,7 @@ namespace basegfx
for(a = 0; a < nOriginalCount; a++)
{
- const B2DPolygon aCandidate(aGeometry.getB2DPolygon(a));
+ const B2DPolygon& aCandidate(aGeometry.getB2DPolygon(a));
const sal_uInt32 nCandCount(aCandidate.count());
// use same condition as above, the data vector is
@@ -710,7 +710,7 @@ namespace basegfx
for(sal_uInt32 a(0); a < rCandidate.count(); a++)
{
- const B2DPolygon aCandidate(rCandidate.getB2DPolygon(a));
+ const B2DPolygon& aCandidate(rCandidate.getB2DPolygon(a));
if(utils::getOrientation(aCandidate) != B2VectorOrientation::Neutral)
{
@@ -749,7 +749,7 @@ namespace basegfx
for(a = 0; a < nCount; a++)
{
- const B2DPolygon aCand(aCandidate.getB2DPolygon(a));
+ const B2DPolygon& aCand(aCandidate.getB2DPolygon(a));
StripHelper* pNewHelper = &(aHelpers[a]);
pNewHelper->maRange = utils::getRange(aCand);
pNewHelper->meOrinetation = utils::getOrientation(aCand);
@@ -760,12 +760,12 @@ namespace basegfx
for(a = 0; a < nCount - 1; a++)
{
- const B2DPolygon aCandA(aCandidate.getB2DPolygon(a));
+ const B2DPolygon& aCandA(aCandidate.getB2DPolygon(a));
StripHelper& rHelperA = aHelpers[a];
for(b = a + 1; b < nCount; b++)
{
- const B2DPolygon aCandB(aCandidate.getB2DPolygon(b));
+ const B2DPolygon& aCandB(aCandidate.getB2DPolygon(b));
StripHelper& rHelperB = aHelpers[b];
const bool bAInB(rHelperB.maRange.isInside(rHelperA.maRange) && utils::isInside(aCandB, aCandA, true));
@@ -829,7 +829,7 @@ namespace basegfx
for(a = 0; a < nCount; a++)
{
- const B2DPolygon aCandidate(rCandidate.getB2DPolygon(a));
+ const B2DPolygon& aCandidate(rCandidate.getB2DPolygon(a));
StripHelper* pNewHelper = &(aHelpers[a]);
pNewHelper->maRange = utils::getRange(aCandidate);
pNewHelper->meOrinetation = utils::getOrientation(aCandidate);
@@ -838,12 +838,12 @@ namespace basegfx
for(a = 0; a < nCount - 1; a++)
{
- const B2DPolygon aCandA(rCandidate.getB2DPolygon(a));
+ const B2DPolygon& aCandA(rCandidate.getB2DPolygon(a));
StripHelper& rHelperA = aHelpers[a];
for(b = a + 1; b < nCount; b++)
{
- const B2DPolygon aCandB(rCandidate.getB2DPolygon(b));
+ const B2DPolygon& aCandB(rCandidate.getB2DPolygon(b));
StripHelper& rHelperB = aHelpers[b];
const bool bAInB(rHelperB.maRange.isInside(rHelperA.maRange) && utils::isInside(aCandB, aCandA, true));
const bool bBInA(rHelperA.maRange.isInside(rHelperB.maRange) && utils::isInside(aCandA, aCandB, true));
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index 2a195641d5f0..7906704e76e3 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -733,7 +733,7 @@ namespace basegfx
for(sal_uInt32 i(0); i < nCount; i++)
{
- const B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(i));
+ const B2DPolygon& aPolygon(rPolyPolygon.getB2DPolygon(i));
const sal_uInt32 nPointCount(aPolygon.count());
if(nPointCount)
diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx
index db0654df266b..abd7340d4b69 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -46,7 +46,7 @@ namespace basegfx
for(sal_uInt32 a(0); a < nPolygonCount; a++)
{
- B3DPolygon aCandidate = rCandidate.getB3DPolygon(a);
+ const B3DPolygon& aCandidate = rCandidate.getB3DPolygon(a);
aRetval.expand(getRange(aCandidate));
}
@@ -470,7 +470,7 @@ namespace basegfx
for(sal_uInt32 a(0); a < nPolygonCount; a++)
{
- const B3DPolygon aPolygon(rCandidate.getB3DPolygon(a));
+ const B3DPolygon& aPolygon(rCandidate.getB3DPolygon(a));
const bool bInside(isInside(aPolygon, rPoint, false/*bWithBorder*/));
if(bInside)
@@ -550,7 +550,7 @@ namespace basegfx
for(sal_uInt32 a(0); a < nPolygonCount; a++)
{
- const basegfx::B3DPolygon aPoly(rPolyPolygonSource.getB3DPolygon(a));
+ const basegfx::B3DPolygon& aPoly(rPolyPolygonSource.getB3DPolygon(a));
const sal_uInt32 nPointCount(aPoly.count());
if(nPointCount)