summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 07:47:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 14:34:59 +0200
commit32ca870833a89ec16ed7e08296dcc573dcc64029 (patch)
treebe4eb8d0382db032b7ddfe22df6303fd86ac2c15 /drawinglayer
parent509c017f5a6ee6b7c1bb9b61b36aef58a06afd27 (diff)
clang-tidy performance-unnecessary-copy-init in dbaccess..drawinglayer
Change-Id: I49a152b2aea93d30b16192260f4f659c7e5fcaee Reviewed-on: https://gerrit.libreoffice.org/62215 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx2
-rw-r--r--drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx2
-rw-r--r--drawinglayer/source/primitive3d/polygonprimitive3d.cxx2
-rw-r--r--drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx4
-rw-r--r--drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx6
-rw-r--r--drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx6
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx6
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx4
-rw-r--r--drawinglayer/source/processor3d/cutfindprocessor3d.cxx4
9 files changed, 18 insertions, 18 deletions
diff --git a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
index be04cd9f44d5..c1b95d8cf069 100644
--- a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
+++ b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
@@ -32,7 +32,7 @@ namespace drawinglayer
Primitive2DReference createHiddenGeometryPrimitives2D(
const basegfx::B2DHomMatrix& rMatrix)
{
- const basegfx::B2DPolygon aUnitOutline(basegfx::utils::createUnitPolygon());
+ const basegfx::B2DPolygon& aUnitOutline(basegfx::utils::createUnitPolygon());
return createHiddenGeometryPrimitives2D(
false/*bFilled*/,
diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
index 4400dd827d66..3e81d31dc66f 100644
--- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
@@ -88,7 +88,7 @@ namespace drawinglayer
for(sal_uInt32 b(0); b < nPolyCount; b++)
{
- const basegfx::B3DPolygon aPartPoly(aFillPolyPolygon.getB3DPolygon(b));
+ const basegfx::B3DPolygon& aPartPoly(aFillPolyPolygon.getB3DPolygon(b));
const sal_uInt32 nPointCount(aPartPoly.count());
basegfx::B2DPolygon aTexPolygon;
diff --git a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx
index c0f08389509d..29e2b9704569 100644
--- a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx
@@ -117,7 +117,7 @@ namespace drawinglayer
// create hair line data for all sub polygons
for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++)
{
- const basegfx::B3DPolygon aCandidate = aHairLinePolyPolygon.getB3DPolygon(a);
+ const basegfx::B3DPolygon& aCandidate = aHairLinePolyPolygon.getB3DPolygon(a);
const Primitive3DReference xRef(new PolygonHairlinePrimitive3D(aCandidate, getLineAttribute().getColor()));
aRetval[a] = xRef;
}
diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
index 6c6f3eb407b5..5f2672edfd7c 100644
--- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
@@ -262,7 +262,7 @@ namespace drawinglayer
for (sal_uInt32 a = 0; a < nCount; ++a)
{
- const basegfx::B3DPolygon aPartPolygon(aSphere.getB3DPolygon(a));
+ const basegfx::B3DPolygon& aPartPolygon(aSphere.getB3DPolygon(a));
const basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon);
// need to create one primitive per Polygon since the primitive
@@ -318,7 +318,7 @@ namespace drawinglayer
for(sal_uInt32 a(0); a < aSphere.count(); a++)
{
- const basegfx::B3DPolygon aPartPolygon(aSphere.getB3DPolygon(a));
+ const basegfx::B3DPolygon& aPartPolygon(aSphere.getB3DPolygon(a));
const basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon);
BasePrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false);
aResultVector.push_back(pNew);
diff --git a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
index 9876cac985fb..a54a0d07b8b6 100644
--- a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
@@ -115,8 +115,8 @@ namespace
for(sal_uInt32 a(0); a < nPolygonCount; a++)
{
- const basegfx::B3DPolygon aSubA(rPolA.getB3DPolygon(a));
- const basegfx::B3DPolygon aSubB(rPolB.getB3DPolygon(a));
+ const basegfx::B3DPolygon& aSubA(rPolA.getB3DPolygon(a));
+ const basegfx::B3DPolygon& aSubB(rPolB.getB3DPolygon(a));
OSL_ENSURE(aSubA.count() == aSubB.count(), "impAddInBetweenFill: unequally sized polygons (!)");
const sal_uInt32 nPointCount(std::min(aSubA.count(), aSubB.count()));
@@ -290,7 +290,7 @@ namespace
for(sal_uInt32 a(0); a < nPolygonCount; a++)
{
basegfx::B3DPolygon aSubA(rPolA.getB3DPolygon(a));
- const basegfx::B3DPolygon aSubB(rPolB.getB3DPolygon(a));
+ const basegfx::B3DPolygon& aSubB(rPolB.getB3DPolygon(a));
OSL_ENSURE(aSubA.count() == aSubB.count(), "sdrExtrudePrimitive3D: unequally sized polygons (!)");
const sal_uInt32 nPointCount(std::min(aSubA.count(), aSubB.count()));
diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
index 4a22113bb8cd..94fb0f34a0d9 100644
--- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
@@ -154,7 +154,7 @@ namespace drawinglayer
for(a = 0; a < nCount; a++)
{
const sal_uInt32 nReducedCount(aReducedLoops.count());
- const basegfx::B3DPolygon aCandidate(aVerLine.getB3DPolygon(a));
+ const basegfx::B3DPolygon& aCandidate(aVerLine.getB3DPolygon(a));
bool bAdd(true);
if(nReducedCount)
@@ -182,8 +182,8 @@ namespace drawinglayer
for(sal_uInt32 b(1); b < nReducedCount; b++)
{
// get loop pair
- const basegfx::B3DPolygon aCandA(aReducedLoops.getB3DPolygon(b - 1));
- const basegfx::B3DPolygon aCandB(aReducedLoops.getB3DPolygon(b));
+ const basegfx::B3DPolygon& aCandA(aReducedLoops.getB3DPolygon(b - 1));
+ const basegfx::B3DPolygon& aCandB(aReducedLoops.getB3DPolygon(b));
// for each loop pair create the connection edges
createReducedOutlines(
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 825b1504e0de..6ac21b0985b0 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -128,7 +128,7 @@ namespace
for(sal_uInt32 a(0); a < nPolyCount; a++)
{
- const basegfx::B2DPolygon aCandidate(rPolyPolygon.getB2DPolygon(a));
+ const basegfx::B2DPolygon& aCandidate(rPolyPolygon.getB2DPolygon(a));
const sal_uInt32 nPointCount(aCandidate.count());
bool bNeedToSplit(false);
@@ -221,7 +221,7 @@ namespace
sal_uInt32 nCount(rPoly.count());
for( sal_uInt32 i=0; i<nCount; ++i )
{
- basegfx::B2DPolygon aCandidate(rPoly.getB2DPolygon(i));
+ const basegfx::B2DPolygon& aCandidate(rPoly.getB2DPolygon(i));
if( !aCandidate.isClosed() || aCandidate.count() > 1 )
aPoly.append(aCandidate);
}
@@ -1390,7 +1390,7 @@ namespace drawinglayer
for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++)
{
- const basegfx::B2DPolygon aCandidate(aHairLinePolyPolygon.getB2DPolygon(a));
+ const basegfx::B2DPolygon& aCandidate(aHairLinePolyPolygon.getB2DPolygon(a));
if(aCandidate.count() > 1)
{
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 002ae53c6560..4a891166f295 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -156,7 +156,7 @@ namespace drawinglayer
}
// get geometry data, prepare hairline data
- basegfx::B2DPolygon aLocalPolygon(rSource.getB2DPolygon());
+ const basegfx::B2DPolygon& aLocalPolygon(rSource.getB2DPolygon());
basegfx::B2DPolyPolygon aHairLinePolyPolygon;
// simplify curve segments
@@ -220,7 +220,7 @@ namespace drawinglayer
for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++)
{
- const basegfx::B2DPolygon aSingle(aHairLinePolyPolygon.getB2DPolygon(a));
+ const basegfx::B2DPolygon& aSingle(aHairLinePolyPolygon.getB2DPolygon(a));
if(aSingle.count())
{
diff --git a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
index aa8479527bb6..09c2f1718253 100644
--- a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
@@ -146,12 +146,12 @@ namespace drawinglayer
if(!maFront.equal(maBack))
{
- const basegfx::B3DPolyPolygon& rPolyPolygon = rPrimitive.getB3DPolyPolygon();
+ const basegfx::B3DPolyPolygon& rPolyPolygon = rPrimitive.getB3DPolyPolygon();
const sal_uInt32 nPolyCount(rPolyPolygon.count());
if(nPolyCount)
{
- const basegfx::B3DPolygon aPolygon(rPolyPolygon.getB3DPolygon(0));
+ const basegfx::B3DPolygon& aPolygon(rPolyPolygon.getB3DPolygon(0));
const sal_uInt32 nPointCount(aPolygon.count());
if(nPointCount > 2)