From 1f9468fc29874eae5100317282ab8b395904406d Mon Sep 17 00:00:00 2001 From: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu, 14 Oct 2021 14:57:54 +0200 Subject: use std::vector::insert instead of push_back because it will pre-allocate space and often is optimised to memcpy Change-Id: I03ed7915f2762d3d27e378638052a47a28bbf096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123588 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> --- slideshow/source/engine/slide/slideimpl.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'slideshow') diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index 4809cc4dc83f..83607ddd7aaf 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -820,8 +820,7 @@ void SlideImpl::drawPolygons() const void SlideImpl::addPolygons(const PolyPolygonVector& rPolygons) { - for (const auto& rxPolygon : rPolygons) - maPolygons.push_back(rxPolygon); + maPolygons.insert(maPolygons.end(), rPolygons.begin(), rPolygons.end()); } bool SlideImpl::isPaintOverlayActive() const -- cgit