summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-04 09:17:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-04 10:16:20 +0200
commit2340c2ffe46271c5a14e8831b8a8f5b56ed2da8c (patch)
treeb25e3c67dd1cf6a9bb85e3fbe5d6054f3d77e10e /include/svx
parent5bfa8b8d5e1cf3cb572dbd91bf3b0cfcf29fb65a (diff)
reduce Primitive2DContainer copying
Change-Id: I418b17034c1949ddda1de7025821ca51f4cdb018 Reviewed-on: https://gerrit.libreoffice.org/78579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/sdr/contact/viewcontact.hxx8
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrobj.hxx2
2 files changed, 6 insertions, 4 deletions
diff --git a/include/svx/sdr/contact/viewcontact.hxx b/include/svx/sdr/contact/viewcontact.hxx
index edc70af19b54..d3455ac77cd0 100644
--- a/include/svx/sdr/contact/viewcontact.hxx
+++ b/include/svx/sdr/contact/viewcontact.hxx
@@ -124,10 +124,12 @@ public:
// add Gluepoints (if available)
virtual drawinglayer::primitive2d::Primitive2DContainer createGluePointPrimitive2DSequence() const;
- // allow embedding if needed (e.g. for SdrObjects, evtl. Name, Title and description get added). This
+ // Allow embedding if needed (e.g. for SdrObjects, evtl. Name, Title and description get added). This
// is a helper normally used from getViewIndependentPrimitive2DContainer(), but there is one exception
- // for 3D scenes
- virtual drawinglayer::primitive2d::Primitive2DContainer embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DContainer& rSource) const;
+ // for 3D scenes.
+ // We take the param by value, since, for the common case, we can just std::move into the param, and
+ // std::move the result out, avoiding copying.
+ virtual drawinglayer::primitive2d::Primitive2DContainer embedToObjectSpecificInformation(drawinglayer::primitive2d::Primitive2DContainer rSource) const;
virtual basegfx::B2DRange getRange( const drawinglayer::geometry::ViewInformation2D& rViewInfo2D ) const;
diff --git a/include/svx/sdr/contact/viewcontactofsdrobj.hxx b/include/svx/sdr/contact/viewcontactofsdrobj.hxx
index df2840476bcd..2508316a7c9f 100644
--- a/include/svx/sdr/contact/viewcontactofsdrobj.hxx
+++ b/include/svx/sdr/contact/viewcontactofsdrobj.hxx
@@ -77,7 +77,7 @@ public:
// allow embedding if needed (e.g. for SdrObjects, evtl. Name, Title and description get added). This
// is a helper normally used from getViewIndependentPrimitive2DContainer(), but there is one exception
// for 3D scenes
- virtual drawinglayer::primitive2d::Primitive2DContainer embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DContainer& rSource) const override;
+ virtual drawinglayer::primitive2d::Primitive2DContainer embedToObjectSpecificInformation(drawinglayer::primitive2d::Primitive2DContainer aSource) const override;
};
}}