summaryrefslogtreecommitdiff
path: root/include/vcl/salbtype.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-03 15:19:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-06 07:12:44 +0100
commitd7817c54fc9d2b688e8c5b15935adb06e6f47197 (patch)
tree6dd139a6c7e674e376bcd490bb4c467d0c5abcbd /include/vcl/salbtype.hxx
parent149247ec64b558244f8d94834ead37a1354029f4 (diff)
BitmapColor::GetLuminance doesn't need to use unsigned long
Change-Id: Ic0f4c2c7576023a96266116a1237190586e4e816 Reviewed-on: https://gerrit.libreoffice.org/44316 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/vcl/salbtype.hxx')
-rw-r--r--include/vcl/salbtype.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx
index 97ca0cf98493..ed38c9a41b8a 100644
--- a/include/vcl/salbtype.hxx
+++ b/include/vcl/salbtype.hxx
@@ -470,7 +470,9 @@ inline BitmapColor& BitmapColor::Invert()
inline sal_uInt8 BitmapColor::GetLuminance() const
{
assert( !mbIndex && "Pixel represents index into colortable" );
- return (static_cast<unsigned long>(mcBlueOrIndex) * 28UL + static_cast<unsigned long>(mcGreen) * 151UL + static_cast<unsigned long>(mcRed) * 77UL) >> 8;
+ return (static_cast<sal_uInt32>(mcBlueOrIndex) * 28
+ + static_cast<sal_uInt32>(mcGreen) * 151
+ + static_cast<sal_uInt32>(mcRed) * 77) >> 8;
}