summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/dibtools.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-06 18:30:29 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-06 18:30:29 +0200
commite2a218114de3fd74848323238188c847a733d9b3 (patch)
treec216426be1308e0b6792fcedf4f390c6db9b4e29 /vcl/source/gdi/dibtools.cxx
parent2f01d679585f9770d81d8e0a8f3eb7a5b4edf2b4 (diff)
Improved loplugin:redundantcast, static_cast on arithmetic types: vcl
Change-Id: I5c85d3df578d0b7e9ffc54679b73a0ce35de8620
Diffstat (limited to 'vcl/source/gdi/dibtools.cxx')
-rw-r--r--vcl/source/gdi/dibtools.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 123d8ce62181..dc3666978fb7 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -503,7 +503,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
{
// we can't trust arbitrary-sourced index based formats to have correct indexes, so we exclude the pal formats
// from raw read and force checking their colormap indexes
- bNative = ( ( static_cast< bool >(rAcc.IsBottomUp()) != bTopDown ) && !bRLE && !bTCMask && ( rAcc.GetScanlineSize() == nAlignedWidth ) );
+ bNative = ( ( rAcc.IsBottomUp() != bTopDown ) && !bRLE && !bTCMask && ( rAcc.GetScanlineSize() == nAlignedWidth ) );
break;
}
@@ -1232,7 +1232,7 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess& rAcc, BitmapReadAccess*
// bitmaps is relatively recent.
// #i59239# discretize bitcount for aligned width to 1,4,8,24
// (other cases are not written below)
- const sal_uInt16 nBitCount(pAccAlpha ? 32 : discretizeBitcount(static_cast< sal_uInt16 >(rAcc.GetBitCount())));
+ const sal_uInt16 nBitCount(pAccAlpha ? 32 : discretizeBitcount(rAcc.GetBitCount()));
const sal_uLong nAlignedWidth(AlignedWidth4Bytes(rAcc.Width() * nBitCount));
bool bNative(false);
@@ -1418,7 +1418,7 @@ bool ImplWriteDIBBody(const Bitmap& rBitmap, SvStream& rOStm, BitmapReadAccess&
// recent.
// #i59239# discretize bitcount to 1,4,8,24 (other cases
// are not written below)
- const sal_uInt16 nBitCount(pAccAlpha ? 32 : discretizeBitcount(static_cast< sal_uInt16 >(rAcc.GetBitCount())));
+ const sal_uInt16 nBitCount(pAccAlpha ? 32 : discretizeBitcount(rAcc.GetBitCount()));
aHeader.nBitCount = nBitCount;
aHeader.nSizeImage = rAcc.Height() * AlignedWidth4Bytes(rAcc.Width() * aHeader.nBitCount);