From a2fc883173d7053cefe543620982051ae40c4b03 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 23 Jun 2020 15:02:35 +0200 Subject: use more std::container::insert instead of std::copy which is both more compact code, and more efficient, since the insert method can do smarter resizing Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948 Tested-by: Jenkins Reviewed-by: Noel Grandin --- slideshow/source/engine/slide/layermanager.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'slideshow') diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx index 2ec37ee2c6ff..a69f42d31372 100644 --- a/slideshow/source/engine/slide/layermanager.cxx +++ b/slideshow/source/engine/slide/layermanager.cxx @@ -722,8 +722,7 @@ namespace slideshow::internal // to avoid tons of temporaries, create weak_ptr to Layers // beforehand - std::vector< LayerWeakPtr > aWeakLayers(maLayers.size()); - std::copy(maLayers.begin(),maLayers.end(),aWeakLayers.begin()); + std::vector< LayerWeakPtr > aWeakLayers(maLayers.begin(),maLayers.end()); std::size_t nCurrLayerIndex(0); bool bIsBackgroundLayer(true); -- cgit