canvas/source/opengl/ogl_canvascustomsprite.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 094babdf63bff535a692f23971ddf0a77424bdd1
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Fri Oct 15 16:30:26 2021 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Fri Oct 15 18:39:21 2021 +0200

    Simplify vector initialization in canvas
    
    Change-Id: Id359ec7fa58350f578f9da430c3b0536c6ff8a35
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123659
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

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;

Reply via email to