summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-16 14:25:56 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-05 08:17:49 -0500
commit67ea91dbfd98598017d88c66a455de58f45cb074 (patch)
tree7f1d081c07ff60548af685aa2abf413bb86be86e /include
parent9493d3f11ba1f9e08e23ea7a1ffce1654dc264a9 (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> (cherry picked from commit 224b770fa77fe12ad5dc543ce020aca316b6558d) (cherry picked from commit 58c171983d4f828d36bf1f6d8fb8329e69424c7e)
Diffstat (limited to 'include')
-rw-r--r--include/tools/color.hxx2
-rw-r--r--include/tools/colordata.hxx2
-rw-r--r--include/vcl/bitmap.hxx2
-rw-r--r--include/vcl/salbtype.hxx22
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 1d0fb42b4e39..a87ce5e600b4 100644
--- a/include/tools/colordata.hxx
+++ b/include/tools/colordata.hxx
@@ -85,7 +85,7 @@ typedef sal_uInt32 ColorData;
#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 082c146d933b..474441719031 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -794,7 +794,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 18f73aa6c943..5129ee76f54f 100644
--- a/include/vcl/salbtype.hxx
+++ b/include/vcl/salbtype.hxx
@@ -521,7 +521,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 );
}
@@ -530,13 +530,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 );
}
@@ -546,7 +546,7 @@ 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::GetColorFor24Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const
@@ -565,16 +565,16 @@ inline void ColorMask::SetColorFor24Bit( const BitmapColor& rColor, sal_uInt8* p
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 );
@@ -584,9 +584,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