summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-10-15 16:30:26 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-10-15 18:39:21 +0200
commit094babdf63bff535a692f23971ddf0a77424bdd1 (patch)
tree9d53af852d64ab777d886c276ed8aa03152c8828 /canvas
parent797458374ff3919070abdaf876cebbd855ce6d8a (diff)
Simplify vector initialization in canvas
Change-Id: Id359ec7fa58350f578f9da430c3b0536c6ff8a35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123659 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/opengl/ogl_canvascustomsprite.cxx6
1 files changed, 2 insertions, 4 deletions
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 <basegfx/polygon/b2dpolygontriangulator.hxx>
#include <basegfx/utils/canvastools.hxx>
#include <canvas/canvastools.hxx>
+#include <o3tl/safeint.hxx>
#include <verifyinput.hxx>
#include <tools/diagnose_ex.h>
@@ -246,10 +247,7 @@ namespace oglcanvas
glVertex2d(maSize.Width+4,maSize.Height+4);
glEnd();
- std::vector<double> aVec;
- aVec.push_back(mfAlpha);
- aVec.push_back(mfPriority);
- aVec.push_back(maCanvasHelper.getRecordedActionCount());
+ std::vector<double> aVec { mfAlpha, mfPriority, o3tl::narrowing<double>(maCanvasHelper.getRecordedActionCount()) };
renderOSD( aVec, 10 );
return true;