summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-12 09:34:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-13 12:52:48 +0100
commit811b77e0f63b91eeb05311c724e3e209bff30f68 (patch)
treee5ea645867e6c420deac3e5d29bbf80845dcd57e
parentfc12aeac3d5238607ba67238fe0da2d73b6da8ba (diff)
remove unused #ifdef
been this way since commit 8ab086b6cc054501bfbf7ef6fa509c393691e860 Author: Jens-Heiner Rechtien <hr@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.grandin@collabora.co.uk>
-rw-r--r--vcl/source/gdi/salmisc.cxx16
1 files changed, 3 insertions, 13 deletions
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,