summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/basegfx/polygon/b2dpolygontools.hxx6
-rw-r--r--include/basegfx/polygon/b3dpolypolygontools.hxx4
-rw-r--r--include/sax/fshelper.hxx2
-rw-r--r--include/tools/stream.hxx2
-rw-r--r--include/xmlscript/xml_helper.hxx2
5 files changed, 8 insertions, 8 deletions
diff --git a/include/basegfx/polygon/b2dpolygontools.hxx b/include/basegfx/polygon/b2dpolygontools.hxx
index c20668995d56..8b5ee03c96e1 100644
--- a/include/basegfx/polygon/b2dpolygontools.hxx
+++ b/include/basegfx/polygon/b2dpolygontools.hxx
@@ -224,7 +224,7 @@ namespace basegfx
/** Create the unit polygon
*/
- BASEGFX_DLLPUBLIC B2DPolygon createUnitPolygon();
+ BASEGFX_DLLPUBLIC B2DPolygon const & createUnitPolygon();
/** Create a circle polygon with given radius.
@@ -241,7 +241,7 @@ namespace basegfx
BASEGFX_DLLPUBLIC B2DPolygon createPolygonFromCircle( const B2DPoint& rCenter, double fRadius );
/// create half circle centered on (0,0) from [0 .. F_PI]
- B2DPolygon createHalfUnitCircle();
+ B2DPolygon const & createHalfUnitCircle();
/** create a polygon which describes the unit circle and close it
@@ -253,7 +253,7 @@ namespace basegfx
this is the lowest one). This is needed since when lines are dashed, toe old
geometry started at bottom point, else it would look different.
*/
- BASEGFX_DLLPUBLIC B2DPolygon createPolygonFromUnitCircle(sal_uInt32 nStartQuadrant = 0);
+ BASEGFX_DLLPUBLIC B2DPolygon const & createPolygonFromUnitCircle(sal_uInt32 nStartQuadrant = 0);
/** Create an ellipse polygon with given radii.
diff --git a/include/basegfx/polygon/b3dpolypolygontools.hxx b/include/basegfx/polygon/b3dpolypolygontools.hxx
index 48fad7ecc0c2..b3905137a123 100644
--- a/include/basegfx/polygon/b3dpolypolygontools.hxx
+++ b/include/basegfx/polygon/b3dpolypolygontools.hxx
@@ -44,11 +44,11 @@ namespace basegfx
/** Create a unit 3D line polyPolygon which defines a cube.
*/
- BASEGFX_DLLPUBLIC B3DPolyPolygon createUnitCubePolyPolygon();
+ BASEGFX_DLLPUBLIC B3DPolyPolygon const & createUnitCubePolyPolygon();
/** Create a unit 3D fill polyPolygon which defines a cube.
*/
- BASEGFX_DLLPUBLIC B3DPolyPolygon createUnitCubeFillPolyPolygon();
+ BASEGFX_DLLPUBLIC B3DPolyPolygon const & createUnitCubeFillPolyPolygon();
/** Create a 3D line polyPolygon from a B3DRange which defines a cube.
*/
diff --git a/include/sax/fshelper.hxx b/include/sax/fshelper.hxx
index 5be3b3bfc697..70ef1025218b 100644
--- a/include/sax/fshelper.hxx
+++ b/include/sax/fshelper.hxx
@@ -212,7 +212,7 @@ public:
FastSerializerHelper* writeId(sal_Int32 tokenId);
- css::uno::Reference< css::io::XOutputStream > getOutputStream() const;
+ css::uno::Reference< css::io::XOutputStream > const & getOutputStream() const;
static FastAttributeList *createAttrList();
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index abf25b1e4a70..640dca026598 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -203,7 +203,7 @@ public:
SvLockBytes* GetLockBytes() const { return m_xLockBytes.get(); }
ErrCode GetError() const { return m_nError.IgnoreWarning(); }
- ErrCode GetErrorCode() const { return m_nError; }
+ ErrCode const & GetErrorCode() const { return m_nError; }
void SetError( ErrCode nErrorCode );
virtual void ResetError();
diff --git a/include/xmlscript/xml_helper.hxx b/include/xmlscript/xml_helper.hxx
index dad9f599f158..508c5789fe1b 100644
--- a/include/xmlscript/xml_helper.hxx
+++ b/include/xmlscript/xml_helper.hxx
@@ -57,7 +57,7 @@ public:
@param nIndex index of sub element
*/
- css::uno::Reference< css::xml::sax::XAttributeList > getSubElement( sal_Int32 nIndex );
+ css::uno::Reference< css::xml::sax::XAttributeList > const & getSubElement( sal_Int32 nIndex );
/** Adds an attribute to elements.