[Libreoffice-commits] core.git: vcl/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jan 20 15:54:17 UTC 2020
vcl/source/bitmap/BitmapTools.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 28fe41b0da74da5795d759c098840fabe8a8c0b6
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Jan 20 12:57:38 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Jan 20 16:53:40 2020 +0100
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 at collabora.com>
Tested-by: Jenkins
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);
More information about the Libreoffice-commits
mailing list