diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2018-02-16 22:46:23 +1100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-02-18 09:21:35 +0100 |
commit | bf2e3dc2a9b3801366c83b0036ca1778198fa8ae (patch) | |
tree | 08a16d007b55a83d7e9286f481e5f09cd274ded0 /include/vcl | |
parent | dad787ca46457c77c1ac67d62a9a370ea3fbd8ee (diff) |
vcl: change mbIndex from sal_uInt8 to bool in BitmapColor
In 193ec57c the comment not to change this bool was kept accidentally,
but memcpy was removed in that commit so this is no longer an issue.
Change-Id: I772d60bb940b3327f195707524b124d034f50f64
Reviewed-on: https://gerrit.libreoffice.org/49852
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/salbtype.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx index 30d59ba2c8da..1a940214501d 100644 --- a/include/vcl/salbtype.hxx +++ b/include/vcl/salbtype.hxx @@ -93,7 +93,7 @@ private: sal_uInt8 mcBlueOrIndex; sal_uInt8 mcGreen; sal_uInt8 mcRed; - sal_uInt8 mbIndex; // should be bool, but see above warning + bool mbIndex; public: @@ -352,7 +352,7 @@ inline BitmapColor::BitmapColor() : mcBlueOrIndex ( 0 ), mcGreen ( 0 ), mcRed ( 0 ), - mbIndex ( sal_uInt8(false) ) + mbIndex (false) { } @@ -360,7 +360,7 @@ constexpr BitmapColor::BitmapColor( sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 mcBlueOrIndex ( cBlue ), mcGreen ( cGreen ), mcRed ( cRed ), - mbIndex ( sal_uInt8(false) ) + mbIndex (false) { } @@ -368,7 +368,7 @@ inline BitmapColor::BitmapColor( const Color& rColor ) : mcBlueOrIndex ( rColor.GetBlue() ), mcGreen ( rColor.GetGreen() ), mcRed ( rColor.GetRed() ), - mbIndex ( sal_uInt8(false) ) + mbIndex (false) { } @@ -376,14 +376,14 @@ inline BitmapColor::BitmapColor( sal_uInt8 cIndex ) : mcBlueOrIndex ( cIndex ), mcGreen ( 0 ), mcRed ( 0 ), - mbIndex ( sal_uInt8(true) ) + mbIndex (true) { } inline bool BitmapColor::operator==( const BitmapColor& rBitmapColor ) const { return( ( mcBlueOrIndex == rBitmapColor.mcBlueOrIndex ) && - ( mbIndex ? bool(rBitmapColor.mbIndex) : + ( mbIndex ? rBitmapColor.mbIndex : ( mcGreen == rBitmapColor.mcGreen && mcRed == rBitmapColor.mcRed ) ) ); } |