summaryrefslogtreecommitdiffstats
path: root/vcl/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-02-24 16:58:44 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-02-24 16:58:44 +0100
commitc684cde025e750d24de47260a2166a46428cdffc (patch)
tree37c6713778764a25ef2d48a9187e197677fc2f39 /vcl/source
parenttdf#97942 Return Ctrl+Shift+Space to the keyword customize (diff)
downloadcore-c684cde025e750d24de47260a2166a46428cdffc.tar.gz
core-c684cde025e750d24de47260a2166a46428cdffc.zip
Ah, xsqr got changed from unsigned to singed
...in 8bcc538953ceec4ef266f16cf72329bc6080d08c "WaE vs2015 literal implicit casting," that explains why 89fe180fbcdfcd8ee3f52955a29eccd3b9ad0f36 "Silence -fsanitize=shift ("left shift of negative value")" became necessary afterwards Change-Id: I1b3d09ba59d60a88e34e48cc3697a20084623817
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/octree.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index 7e54f077081b..cc1f3d5a54a7 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -234,8 +234,8 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
nBits( 8 - OCTREE_BITS )
{
const int nColorMax = 1 << OCTREE_BITS;
- const long xsqr = 1L << ( nBits << 1 );
- const long xsqr2 = xsqr << 1;
+ const unsigned long xsqr = 1L << ( nBits << 1 );
+ const unsigned long xsqr2 = xsqr << 1;
const int nColors = rPal.GetEntryCount();
const long x = 1L << nBits;
const long x2 = x >> 1L;
@@ -256,9 +256,9 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
long bdist = cBlue - x2;
rdist = rdist*rdist + gdist*gdist + bdist*bdist;
- const long crinc = static_cast<unsigned long>( xsqr - ( cRed << nBits ) ) << 1L;
- const long cginc = static_cast<unsigned long>( xsqr - ( cGreen << nBits ) ) << 1L;
- const long cbinc = static_cast<unsigned long>( xsqr - ( cBlue << nBits ) ) << 1L;
+ const long crinc = ( xsqr - ( cRed << nBits ) ) << 1L;
+ const long cginc = ( xsqr - ( cGreen << nBits ) ) << 1L;
+ const long cbinc = ( xsqr - ( cBlue << nBits ) ) << 1L;
sal_uLong* cdp = reinterpret_cast<sal_uLong*>(pBuffer);
sal_uInt8* crgbp = pMap;