[Libreoffice-commits] online.git: .clang-tidy common/Png.hpp

Miklos Vajna vmiklos at collabora.co.uk
Mon Dec 5 11:02:12 UTC 2016


 .clang-tidy    |    2 +-
 common/Png.hpp |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6a08b444334ee422fd1b195ee4d26719129b1579
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Dec 5 11:56:12 2016 +0100

    Png: avoid multiplication at int precision, then converting to long
    
    Change-Id: Id05d1db07ae7e8978b2a6b989b6366ae66d0e9de

diff --git a/.clang-tidy b/.clang-tidy
index eaef0e5..9853876 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,3 +1,3 @@
-Checks: 'clang-diagnostic-*,performance-*,unused-*,misc-*,-misc-macro-parentheses,readability-redundant-*'
+Checks: 'clang-diagnostic-*,performance-*,unused-*,misc-*,-misc-macro-parentheses,readability-redundant-*,-readability-redundant-declaration'
 WarningsAsErrors: '*'
 
diff --git a/common/Png.hpp b/common/Png.hpp
index b4ff059..3e2b473 100644
--- a/common/Png.hpp
+++ b/common/Png.hpp
@@ -160,14 +160,14 @@ bool encodeBufferToPNG(unsigned char* pixmap, int width, int height,
 }
 
 inline
-uint64_t hashBuffer(unsigned char* pixmap, int width, int height)
+uint64_t hashBuffer(unsigned char* pixmap, long width, long height)
 {
     return SpookyHash::Hash64(pixmap, width * height * 4, 1073741789);
 }
 
 inline
 uint64_t hashSubBuffer(unsigned char* pixmap, size_t startX, size_t startY,
-                       int width, int height, int bufferWidth, int bufferHeight)
+                       long width, long height, int bufferWidth, int bufferHeight)
 {
     if (bufferWidth < width || bufferHeight < height)
         return 0; // magic invalid hash.


More information about the Libreoffice-commits mailing list