From 46ea7c5d8be6b3e9436a44240117f83808d9d4c1 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Tue, 8 Jun 2021 10:31:10 +0200 Subject: [PATCH] Simplify Sequences initializations (cppcanvas) Change-Id: If2d882060422b4e450de9ddda28d8d5c624c8e24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116816 Tested-by: Jenkins Reviewed-by: Julien Nabet --- cppcanvas/source/mtfrenderer/polypolyaction.cxx | 3 +-- cppcanvas/source/wrapper/implbitmap.cxx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cppcanvas/source/mtfrenderer/polypolyaction.cxx b/cppcanvas/source/mtfrenderer/polypolyaction.cxx index 6d679cbd0a81..cc9fec338ca0 100644 --- a/cppcanvas/source/mtfrenderer/polypolyaction.cxx +++ b/cppcanvas/source/mtfrenderer/polypolyaction.cxx @@ -278,8 +278,7 @@ namespace cppcanvas::internal rendering::RenderState aLocalState( maState ); ::canvas::tools::prependToRenderState(aLocalState, rTransformation); - uno::Sequence< rendering::Texture > aSeq(1); - aSeq[0] = maTexture; + uno::Sequence< rendering::Texture > aSeq { maTexture }; rCachedPrimitive = mpCanvas->getUNOCanvas()->fillTexturedPolyPolygon( mxPolyPoly, mpCanvas->getViewState(), diff --git a/cppcanvas/source/wrapper/implbitmap.cxx b/cppcanvas/source/wrapper/implbitmap.cxx index 9b7883f053a3..176fcd1cd849 100644 --- a/cppcanvas/source/wrapper/implbitmap.cxx +++ b/cppcanvas/source/wrapper/implbitmap.cxx @@ -84,8 +84,7 @@ namespace cppcanvas::internal } rendering::RenderState aLocalState( getRenderState() ); - uno::Sequence aCol(1); - aCol[0] = rendering::ARGBColor( nAlphaModulation, 1.0, 1.0, 1.0 ); + uno::Sequence aCol { { nAlphaModulation, 1.0, 1.0, 1.0 } }; aLocalState.DeviceColor = pCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace()->convertFromARGB(aCol);