[Libreoffice-commits] online.git: loolwsd/Png.hpp

Miklos Vajna vmiklos at collabora.co.uk
Thu Aug 4 07:48:56 UTC 2016


 loolwsd/Png.hpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6c48dfdcf8e153847b6a0a2498357f0b55499473
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Aug 4 09:48:23 2016 +0200

    Png: avoid performing multiplication at int precision
    
    When the result will be stored at size_t precision anyway.
    
    Change-Id: Ic52904d853eb27972d545fea6e742bc9e0d48c3d

diff --git a/loolwsd/Png.hpp b/loolwsd/Png.hpp
index 19bda55..7533c4e 100644
--- a/loolwsd/Png.hpp
+++ b/loolwsd/Png.hpp
@@ -103,7 +103,7 @@ unpremultiply_data (png_structp /*png*/, png_row_infop row_info, png_bytep data)
 // Sadly, older libpng headers don't use const for the pixmap pointer parameter to
 // png_write_row(), so can't use const here for pixmap.
 inline
-bool encodeSubBufferToPNG(unsigned char* pixmap, int startX, int startY,
+bool encodeSubBufferToPNG(unsigned char* pixmap, size_t startX, size_t startY,
                           int width, int height,
                           int bufferWidth, int bufferHeight,
                           std::vector<char>& output, LibreOfficeKitTileMode mode)


More information about the Libreoffice-commits mailing list