From 05f47e6d9f0c442e481b2435cc5c2ef615ab347a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 11 Jul 2017 14:29:18 +0200 Subject: replace 'resize(size+1)' with emplace_back which is considerably faster if we're dealing with a std::list, and just easier on the eyes if we're dealing with a std::vector Change-Id: I373689205ebc048689f29ab80a7ee8551b20cc96 Reviewed-on: https://gerrit.libreoffice.org/39816 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/inc/opengl/RenderList.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcl/inc') diff --git a/vcl/inc/opengl/RenderList.hxx b/vcl/inc/opengl/RenderList.hxx index 062971ec29f3..6188203c77ea 100644 --- a/vcl/inc/opengl/RenderList.hxx +++ b/vcl/inc/opengl/RenderList.hxx @@ -95,7 +95,7 @@ private: { if (maRenderEntries.empty() || doesOverlap(rDrawRectangle)) { - maRenderEntries.resize(maRenderEntries.size() + 1); + maRenderEntries.emplace_back(); maRenderEntries.back().maOverlapTrackingRectangle = rDrawRectangle; maRectangles.clear(); -- cgit