From 27c5268dd9908b749ca251e172944278d761a335 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 6 Mar 2017 12:16:12 +0000 Subject: reserve the known amount we'll append Change-Id: Ib476453eb3c527cc8c3be679ebc6267a0b53d10e --- filter/source/graphicfilter/ipict/shape.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'filter') diff --git a/filter/source/graphicfilter/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx index 5aca6d47dba8..99b8719ad623 100644 --- a/filter/source/graphicfilter/ipict/shape.cxx +++ b/filter/source/graphicfilter/ipict/shape.cxx @@ -240,6 +240,7 @@ void drawPolygon(VirtualDevice *dev, bool drawFrame, tools::Polygon const &orig, using namespace basegfx; B2DPolygon poly; + poly.reserve(numPt); // Note: a polygon can be open, so we must not close it when we draw the frame for (int i = 0; i < numPt; i++) { Point const &pt = orig.GetPoint(i); -- cgit