vcl/source/bitmap/bitmap.cxx | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-)
New commits: commit 02a6d37131ab0b522d5b7551b2b24e98291ecf1c Author: Mike Kaganski <[email protected]> AuthorDate: Fri Jul 22 09:22:52 2022 +0200 Commit: Mike Kaganski <[email protected]> CommitDate: Fri Jul 22 10:27:10 2022 +0200 Simplify small grey palette initialization Change-Id: I6a4fc8aa3c89654925821fcef75e27c8e3fd12b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137323 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index a02179aea0f6..ff5110a8ded1 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -173,25 +173,21 @@ const BitmapPalette& Bitmap::GetGreyPalette( int nEntries ) { case 2: { - static const BitmapPalette aGreyPalette2 = [] { - BitmapPalette aPalette(2); - aPalette[0] = BitmapColor(0, 0, 0); - aPalette[1] = BitmapColor(255, 255, 255); - return aPalette; - }(); + static const BitmapPalette aGreyPalette2 = { + BitmapColor(0, 0, 0), + BitmapColor(255, 255, 255), + }; return aGreyPalette2; } case 4: { - static const BitmapPalette aGreyPalette4 = [] { - BitmapPalette aPalette(4); - aPalette[0] = BitmapColor(0, 0, 0); - aPalette[1] = BitmapColor(85, 85, 85); - aPalette[2] = BitmapColor(170, 170, 170); - aPalette[3] = BitmapColor(255, 255, 255); - return aPalette; - }(); + static const BitmapPalette aGreyPalette4 = { + BitmapColor(0, 0, 0), + BitmapColor(85, 85, 85), + BitmapColor(170, 170, 170), + BitmapColor(255, 255, 255), + }; return aGreyPalette4; }
