vcl/source/gdi/salmisc.cxx |   16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

New commits:
commit 811b77e0f63b91eeb05311c724e3e209bff30f68
Author:     Noel <noelgran...@gmail.com>
AuthorDate: Thu Nov 12 09:34:23 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Nov 13 12:52:48 2020 +0100

    remove unused #ifdef
    
    been this way since
        commit 8ab086b6cc054501bfbf7ef6fa509c393691e860
        Author: Jens-Heiner Rechtien <h...@openoffice.org>
        Date:   Mon Sep 18 16:07:07 2000 +0000
        initial import
    
    Change-Id: I878f45163fc0836c786acc12f11d9cd704e4cd64
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105624
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 14af546fca67..65ac13656db6 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -41,23 +41,13 @@ while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == 
nMapY ) )
     nActY++;                                                                   
 \
 }
 
-#define TC_TO_PAL_COLORS    4096
+constexpr int TC_TO_PAL_COLORS = 4096;
 
 static tools::Long ImplIndexFromColor( const BitmapColor& rCol )
 {
-#if TC_TO_PAL_COLORS == 4096
-
-    return( ( ( static_cast<tools::Long>(rCol.GetBlue()) >> 4) << 8 ) |
+    return  ( ( static_cast<tools::Long>(rCol.GetBlue()) >> 4) << 8 ) |
             ( ( static_cast<tools::Long>(rCol.GetGreen()) >> 4 ) << 4 ) |
-            ( static_cast<tools::Long>(rCol.GetRed()) >> 4 ) );
-
-#elif TC_TO_PAL_COLORS == 32768
-
-    return( ( ( (tools::Long) rCol.GetBlue() >> 3) << 10 ) |
-            ( ( (tools::Long) rCol.GetGreen() >> 3 ) << 5 ) |
-            ( (tools::Long) rCol.GetRed() >> 3 ) );
-
-#endif
+            ( static_cast<tools::Long>(rCol.GetRed()) >> 4 );
 }
 
 static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& 
rDstBuffer,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to