diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-12 08:54:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-12 09:16:30 +0100 |
commit | 4cb993343f58112dbe15cb188ba643a6c4e5bf7c (patch) | |
tree | 8f99afd54a85d7f754a8611ccc40923b38b62b72 /basegfx | |
parent | ae5b6a6e5e73517eb40d4f8d7d2c17d1bfba810f (diff) |
4 minutes 27 seconds -> 11 seconds
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/polygon/b2dpolypolygon.cxx | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/basegfx/source/polygon/b2dpolypolygon.cxx b/basegfx/source/polygon/b2dpolypolygon.cxx index 4c8ab7b44a45..b55af03e9575 100644 --- a/basegfx/source/polygon/b2dpolypolygon.cxx +++ b/basegfx/source/polygon/b2dpolypolygon.cxx @@ -93,21 +93,10 @@ public: void insert(sal_uInt32 nIndex, const basegfx::B2DPolyPolygon& rPolyPolygon) { - const sal_uInt32 nCount = rPolyPolygon.count(); - - if(nCount) - { - // add nCount polygons from rPolyPolygon - maPolygons.reserve(maPolygons.size() + nCount); - PolygonVector::iterator aIndex(maPolygons.begin()); - aIndex += nIndex; - - for(sal_uInt32 a(0L); a < nCount; a++) - { - aIndex = maPolygons.insert(aIndex, rPolyPolygon.getB2DPolygon(a)); - ++aIndex; - } - } + // add all polygons from rPolyPolygon + PolygonVector::iterator aIndex(maPolygons.begin()); + aIndex += nIndex; + maPolygons.insert(aIndex, rPolyPolygon.begin(), rPolyPolygon.end()); } void remove(sal_uInt32 nIndex, sal_uInt32 nCount) |