From 094babdf63bff535a692f23971ddf0a77424bdd1 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Fri, 15 Oct 2021 16:30:26 +0200 Subject: Simplify vector initialization in canvas Change-Id: Id359ec7fa58350f578f9da430c3b0536c6ff8a35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123659 Tested-by: Jenkins Reviewed-by: Julien Nabet --- canvas/source/opengl/ogl_canvascustomsprite.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'canvas') diff --git a/canvas/source/opengl/ogl_canvascustomsprite.cxx b/canvas/source/opengl/ogl_canvascustomsprite.cxx index 852933d33698..4be2b5db2416 100644 --- a/canvas/source/opengl/ogl_canvascustomsprite.cxx +++ b/canvas/source/opengl/ogl_canvascustomsprite.cxx @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -246,10 +247,7 @@ namespace oglcanvas glVertex2d(maSize.Width+4,maSize.Height+4); glEnd(); - std::vector aVec; - aVec.push_back(mfAlpha); - aVec.push_back(mfPriority); - aVec.push_back(maCanvasHelper.getRecordedActionCount()); + std::vector aVec { mfAlpha, mfPriority, o3tl::narrowing(maCanvasHelper.getRecordedActionCount()) }; renderOSD( aVec, 10 ); return true; -- cgit v1.2.3