summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-12-22 14:23:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-23 08:04:54 +0100
commit2a1fb4401da16f6a18c0bd05fe4b460a3048f9b5 (patch)
treee659812bc29bb01db62cde81f3d218758b26e07c /basegfx
parent7f42b0f96a2798ae99aa65b84b0db3b2af2b282b (diff)
loplugin:passstuffbyref improved returns
improve the detection of stuff we can return by const &, instead of by copying Change-Id: I479ae89d0413125a8295cc3cddbc0017ed61ed69 Reviewed-on: https://gerrit.libreoffice.org/46915 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dpolygontools.cxx6
-rw-r--r--basegfx/source/polygon/b3dpolypolygontools.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 489b77af92aa..e0a4721505ba 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -1645,7 +1645,7 @@ namespace basegfx
};
}
- B2DPolygon createUnitPolygon()
+ B2DPolygon const & createUnitPolygon()
{
return theUnitPolygon::get();
}
@@ -1719,7 +1719,7 @@ namespace basegfx
};
}
- B2DPolygon createHalfUnitCircle()
+ B2DPolygon const & createHalfUnitCircle()
{
return theUnitHalfCircle::get();
}
@@ -1751,7 +1751,7 @@ namespace basegfx
};
}
- B2DPolygon createPolygonFromUnitCircle(sal_uInt32 nStartQuadrant)
+ B2DPolygon const & createPolygonFromUnitCircle(sal_uInt32 nStartQuadrant)
{
switch(nStartQuadrant % 4)
{
diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx
index d3ae28120e29..9c79bc14bc1f 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -100,7 +100,7 @@ namespace basegfx
};
}
- B3DPolyPolygon createUnitCubePolyPolygon()
+ B3DPolyPolygon const & createUnitCubePolyPolygon()
{
return theUnitCubePolyPolygon::get();
}
@@ -182,7 +182,7 @@ namespace basegfx
};
}
- B3DPolyPolygon createUnitCubeFillPolyPolygon()
+ B3DPolyPolygon const & createUnitCubeFillPolyPolygon()
{
return theUnitCubeFillPolyPolygon::get();
}