diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-12-12 17:50:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-12-12 23:30:44 +0100 |
commit | eb002da913cd1745b039bbc7e519542d7990fb49 (patch) | |
tree | 6a035877c86301a8d2184ff3026d5dae740a6789 /vcl | |
parent | dcdaca599987ded1577bd04ed1e70f5bd02e943f (diff) |
Remove obsolete "explicit operator bool" hack
...and fix the call sites that exploited the hack's internals being non-
transparent.
Change-Id: Ib3b06c3945e303d4088c4e1b65be5beed8613bac
Reviewed-on: https://gerrit.libreoffice.org/46325
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/bitmap/BitmapScaleConvolution.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/igif/gifread.cxx | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/bitmap/BitmapScaleConvolution.cxx b/vcl/source/bitmap/BitmapScaleConvolution.cxx index 49aed5d5940b..498d1084ab73 100644 --- a/vcl/source/bitmap/BitmapScaleConvolution.cxx +++ b/vcl/source/bitmap/BitmapScaleConvolution.cxx @@ -109,7 +109,7 @@ bool ImplScaleConvolutionHor(Bitmap& rSource, Bitmap& rTarget, const double& rSc ImplCalculateContributions(nWidth, nNewWidth, aNumberOfContributions, pWeights, pPixels, pCount, aKernel); rTarget = Bitmap(Size(nNewWidth, nHeight), 24); Bitmap::ScopedWriteAccess pWriteAcc(rTarget); - bool bResult(nullptr != pWriteAcc); + bool bResult(pWriteAcc); if(bResult) { @@ -195,7 +195,7 @@ bool ImplScaleConvolutionVer(Bitmap& rSource, Bitmap& rTarget, const double& rSc ImplCalculateContributions(nHeight, nNewHeight, aNumberOfContributions, pWeights, pPixels, pCount, aKernel); rTarget = Bitmap(Size(nWidth, nNewHeight), 24); Bitmap::ScopedWriteAccess pWriteAcc(rTarget); - bool bResult(nullptr != pWriteAcc); + bool bResult(pWriteAcc); if(pWriteAcc) { diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 9695f09d8784..f35d2d398c19 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -222,7 +222,7 @@ void GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, aBmp8.Erase( Color( COL_WHITE ) ); pAcc8 = Bitmap::ScopedWriteAccess(aBmp8); - bStatus = ( pAcc8 != nullptr ); + bStatus = bool(pAcc8); } } @@ -685,13 +685,13 @@ Graphic GIFReader::GetIntermediateGraphic() aImGraphic = BitmapEx( aBmp8, aBmp1 ); pAcc1 = Bitmap::ScopedWriteAccess(aBmp1); - bStatus = bStatus && ( pAcc1 != nullptr ); + bStatus = bStatus && pAcc1; } else aImGraphic = aBmp8; pAcc8 = Bitmap::ScopedWriteAccess(aBmp8); - bStatus = bStatus && ( pAcc8 != nullptr ); + bStatus = bStatus && pAcc8; } return aImGraphic; |