[Libreoffice-commits] core.git: vcl/win

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Dec 7 10:22:03 UTC 2018


 vcl/win/gdi/gdiimpl.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2ee6993007fc5160f73b7e560f6825fcecd0447e
Author:     Dmitriy Shilin <dshil at fastmail.com>
AuthorDate: Fri Dec 7 07:51:33 2018 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Dec 7 11:21:36 2018 +0100

    vcl: use ref to const while iterating over palette entries
    
    Change-Id: I2a1b36d9f4bb17f8b60af86a48bc9ec84588a32b
    Reviewed-on: https://gerrit.libreoffice.org/64749
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index d8fd23ed6847..fbb36b16ffe2 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -211,7 +211,7 @@ bool IsDitherColor(BYTE nRed, BYTE nGreen, BYTE nBlue)
 
 bool IsPaletteColor(BYTE nRed, BYTE nGreen, BYTE nBlue)
 {
-    static PALETTEENTRY aImplSalSysPalEntryAry[] =
+    static const PALETTEENTRY aImplSalSysPalEntryAry[] =
     {
     {    0,    0,    0, 0 },
     {    0,    0, 0x80, 0 },
@@ -231,7 +231,7 @@ bool IsPaletteColor(BYTE nRed, BYTE nGreen, BYTE nBlue)
     { 0xFF, 0xFF, 0xFF, 0 }
     };
 
-    for (auto& rPalEntry : aImplSalSysPalEntryAry)
+    for (const auto& rPalEntry : aImplSalSysPalEntryAry)
     {
         if(rPalEntry.peRed == nRed &&
            rPalEntry.peGreen == nGreen &&


More information about the Libreoffice-commits mailing list