diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2018-10-14 22:09:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-15 07:56:00 +0200 |
commit | 40bc840da261fcc5652e5278dc2566b61f990884 (patch) | |
tree | 7d472b8f69bfa7bf6b8c67585d74b6dee4f5bcc4 /svx/source/xoutdev/_xpoly.cxx | |
parent | 2da25cb43f4af8d094b01de1073eee2e2023c029 (diff) |
use range based loops over B2DPolyPolygon in svx
avoid copy when adapting polygon in SdrPathObj::ImpForceKind()
Change-Id: Ifd830ecd181563102ee269c6a609ef8ebeab670c
Reviewed-on: https://gerrit.libreoffice.org/61767
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/xoutdev/_xpoly.cxx')
-rw-r--r-- | svx/source/xoutdev/_xpoly.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index 286d8c9ea834..74980ecdc994 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -855,10 +855,9 @@ XPolyPolygon::XPolyPolygon( XPolyPolygon&& ) = default; XPolyPolygon::XPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon) : pImpXPolyPolygon() { - for(sal_uInt32 a(0); a < rPolyPolygon.count(); a++) + for(auto const& rCandidate : rPolyPolygon) { - const basegfx::B2DPolygon aCandidate = rPolyPolygon.getB2DPolygon(a); - Insert(XPolygon(aCandidate)); + Insert(XPolygon(rCandidate)); } } |