diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-16 14:25:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-17 08:14:03 +0200 |
commit | 224b770fa77fe12ad5dc543ce020aca316b6558d (patch) | |
tree | 5bd71b4ccf39558b4afcd3f7f67744a111cda3b8 /include | |
parent | b2cb3196868deb499bb91fc9bdbe6c8f7d1e9033 (diff) |
remove UL/L suffixes from shift-by-constant expressions
Change-Id: Ia470f643e3eefeccc14183133603db260460bd53
Reviewed-on: https://gerrit.libreoffice.org/41212
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/tools/color.hxx | 2 | ||||
-rw-r--r-- | include/tools/colordata.hxx | 2 | ||||
-rw-r--r-- | include/vcl/bitmap.hxx | 2 | ||||
-rw-r--r-- | include/vcl/salbtype.hxx | 22 |
4 files changed, 14 insertions, 14 deletions
diff --git a/include/tools/color.hxx b/include/tools/color.hxx index 3b7cd38fcad2..592d69ad458d 100644 --- a/include/tools/color.hxx +++ b/include/tools/color.hxx @@ -188,7 +188,7 @@ inline sal_uInt8 Color::GetLuminance() const { return static_cast<sal_uInt8>((COLORDATA_BLUE(mnColor) * 29UL + COLORDATA_GREEN(mnColor) * 151UL + - COLORDATA_RED(mnColor) * 76UL) >> 8UL); + COLORDATA_RED(mnColor) * 76UL) >> 8); } inline void Color::Merge( const Color& rMergeColor, sal_uInt8 cTransparency ) diff --git a/include/tools/colordata.hxx b/include/tools/colordata.hxx index 3df26b57092b..ffe5a2d14b44 100644 --- a/include/tools/colordata.hxx +++ b/include/tools/colordata.hxx @@ -93,7 +93,7 @@ constexpr ColorData RGB_COLORDATA(sal_uInt8 r, sal_uInt8 g, sal_uInt8 b) { #define COL_AUTHOR9_LIGHT RGB_COLORDATA(255, 231, 199) #define COLOR_CHANNEL_MERGE( _def_cDst, _def_cSrc, _def_cSrcTrans ) \ - ((sal_uInt8)((((long)(_def_cDst)-(_def_cSrc))*(_def_cSrcTrans)+(((_def_cSrc)<<8L)|(_def_cDst)))>>8L)) + ((sal_uInt8)((((long)(_def_cDst)-(_def_cSrc))*(_def_cSrcTrans)+(((_def_cSrc)<<8)|(_def_cDst)))>>8)) #endif diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index 115f47664aa7..f1ba07085e37 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -775,7 +775,7 @@ inline sal_uLong Bitmap::GetColorCount() const inline sal_uLong Bitmap::GetSizeBytes() const { const Size aSizePix( GetSizePixel() ); - return( ( (sal_uLong) aSizePix.Width() * aSizePix.Height() * GetBitCount() ) >> 3UL ); + return( ( (sal_uLong) aSizePix.Width() * aSizePix.Height() * GetBitCount() ) >> 3 ); } #endif // INCLUDED_VCL_BITMAP_HXX diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx index 7aa075aeed3c..47d51e00b799 100644 --- a/include/vcl/salbtype.hxx +++ b/include/vcl/salbtype.hxx @@ -524,7 +524,7 @@ inline void ColorMask::SetColorFor8Bit( const BitmapColor& rColor, sal_uInt8* pP inline void ColorMask::GetColorFor16BitMSB( BitmapColor& rColor, const sal_uInt8* pPixel ) const { - const sal_uInt32 nVal = pPixel[ 1 ] | ( (sal_uInt32) pPixel[ 0 ] << 8UL ); + const sal_uInt32 nVal = pPixel[ 1 ] | ( (sal_uInt32) pPixel[ 0 ] << 8 ); MASK_TO_COLOR( nVal, maR.mnMask, maG.mnMask, maB.mnMask, maR.mnShift, maG.mnShift, maB.mnShift, rColor ); } @@ -533,13 +533,13 @@ inline void ColorMask::SetColorFor16BitMSB( const BitmapColor& rColor, sal_uInt8 { const sal_uInt16 nVal = (sal_uInt16)COLOR_TO_MASK( rColor, maR.mnMask, maG.mnMask, maB.mnMask, maR.mnShift, maG.mnShift, maB.mnShift, 0/*nAlphaChannel*/ ); - pPixel[ 0 ] = (sal_uInt8)(nVal >> 8U); + pPixel[ 0 ] = (sal_uInt8)(nVal >> 8); pPixel[ 1 ] = (sal_uInt8) nVal; } inline void ColorMask::GetColorFor16BitLSB( BitmapColor& rColor, const sal_uInt8* pPixel ) const { - const sal_uInt32 nVal = pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL ); + const sal_uInt32 nVal = pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8 ); MASK_TO_COLOR( nVal, maR.mnMask, maG.mnMask, maB.mnMask, maR.mnShift, maG.mnShift, maB.mnShift, rColor ); } @@ -549,21 +549,21 @@ inline void ColorMask::SetColorFor16BitLSB( const BitmapColor& rColor, sal_uInt8 const sal_uInt16 nVal = (sal_uInt16)COLOR_TO_MASK( rColor, maR.mnMask, maG.mnMask, maB.mnMask, maR.mnShift, maG.mnShift, maB.mnShift, 0/*nAlphaChannel*/ ); pPixel[ 0 ] = (sal_uInt8) nVal; - pPixel[ 1 ] = (sal_uInt8)(nVal >> 8U); + pPixel[ 1 ] = (sal_uInt8)(nVal >> 8); } inline void ColorMask::GetColorFor32Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const { - const sal_uInt32 nVal = (sal_uInt32) pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL ) | - ( (sal_uInt32) pPixel[ 2 ] << 16UL ) | ( (sal_uInt32) pPixel[ 3 ] << 24UL ); + const sal_uInt32 nVal = (sal_uInt32) pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8 ) | + ( (sal_uInt32) pPixel[ 2 ] << 16 ) | ( (sal_uInt32) pPixel[ 3 ] << 24 ); MASK_TO_COLOR( nVal, maR.mnMask, maG.mnMask, maB.mnMask, maR.mnShift, maG.mnShift, maB.mnShift, rColor ); } inline void ColorMask::GetColorAndAlphaFor32Bit( BitmapColor& rColor, sal_uInt8& rAlpha, const sal_uInt8* pPixel ) const { - const sal_uInt32 nVal = (sal_uInt32) pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL ) | - ( (sal_uInt32) pPixel[ 2 ] << 16UL ) | ( (sal_uInt32) pPixel[ 3 ] << 24UL ); + const sal_uInt32 nVal = (sal_uInt32) pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8 ) | + ( (sal_uInt32) pPixel[ 2 ] << 16 ) | ( (sal_uInt32) pPixel[ 3 ] << 24 ); rAlpha = (sal_uInt8)(nVal >> 24); MASK_TO_COLOR( nVal, maR.mnMask, maG.mnMask, maB.mnMask, maR.mnShift, maG.mnShift, maB.mnShift, rColor ); @@ -573,9 +573,9 @@ inline void ColorMask::SetColorFor32Bit( const BitmapColor& rColor, sal_uInt8* p { const sal_uInt32 nVal = COLOR_TO_MASK( rColor, maR.mnMask, maG.mnMask, maB.mnMask, maR.mnShift, maG.mnShift, maB.mnShift, 0/*nAlphaChannel*/ ); pPixel[ 0 ] = (sal_uInt8) nVal; - pPixel[ 1 ] = (sal_uInt8) ( nVal >> 8UL ); - pPixel[ 2 ] = (sal_uInt8) ( nVal >> 16UL ); - pPixel[ 3 ] = (sal_uInt8) ( nVal >> 24UL ); + pPixel[ 1 ] = (sal_uInt8) ( nVal >> 8 ); + pPixel[ 2 ] = (sal_uInt8) ( nVal >> 16 ); + pPixel[ 3 ] = (sal_uInt8) ( nVal >> 24 ); } #endif // INCLUDED_VCL_SALBTYPE_HXX |