summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-01-20 12:57:38 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-01-20 16:53:40 +0100
commit28fe41b0da74da5795d759c098840fabe8a8c0b6 (patch)
treeb2b9cf8b848b5650483ed4b9d99ae05c4d3efa66 /vcl
parent9245fd026a2cba4bd90c7885c00d328bc34f3484 (diff)
Use properly typed vars to iterate over Size::Height(), Size::Width()
The code had oddly been like this since it was introduced with 7cf2b5809f7137acc7a5eed9159042b3d748da01 "Cairo canvas fixes" (and then moved here with 32d8a32dcf85e2cee589ee19bc72b4abf73f9681 "move cairo surface code from canvas to BitmapTools"). Change-Id: I9140ca1bae71e784fc9c6f1a29de143a2d477dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87066 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/bitmap/BitmapTools.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx
index 24f202e3e636..119781aca94d 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -267,10 +267,10 @@ BitmapEx* CreateFromCairoSurface(Size aSize, cairo_surface_t * pSurface)
unsigned char *pSrc = cairo_image_surface_get_data( pPixels );
unsigned int nStride = cairo_image_surface_get_stride( pPixels );
vcl::bitmap::lookup_table unpremultiply_table = vcl::bitmap::get_unpremultiply_table();
- for( unsigned long y = 0; y < static_cast<unsigned long>(aSize.Height()); y++ )
+ for( long y = 0; y < aSize.Height(); y++ )
{
sal_uInt32 *pPix = reinterpret_cast<sal_uInt32 *>(pSrc + nStride * y);
- for( unsigned long x = 0; x < static_cast<unsigned long>(aSize.Width()); x++ )
+ for( long x = 0; x < aSize.Width(); x++ )
{
#if defined OSL_BIGENDIAN
sal_uInt8 nB = (*pPix >> 24);