[Libreoffice-commits] core.git: svtools/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jan 25 16:12:17 UTC 2020
svtools/source/brwbox/brwbox2.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit a6192281a04c20bc57b1ffa4f6645ca639d5b1a4
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Jan 25 13:38:41 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Jan 25 17:11:44 2020 +0100
Avoid explicit cast to smaller sal_uInt16 from larger long
...in what might be an attempt to avoid warnings about signed vs. unsigned
comparisons. (The mismatch had been there ever since
8ab086b6cc054501bfbf7ef6fa509c393691e860 "initial import".)
Change-Id: I35c849ac5a850cfb2379d7b29e6da6308611c3d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87396
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 10a4202f71c4..8daede5fa7b9 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/log.hxx>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <tools/debug.hxx>
#include <svtools/brwbox.hxx>
@@ -1359,7 +1360,7 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
sal_uInt16 nX = 0;
for ( size_t nCol = 0;
nCol < mvCols.size() &&
- ( nX + mvCols[ nCol ]->Width() ) < sal_uInt16(GetOutputSizePixel().Width());
+ ( nX + mvCols[ nCol ]->Width() ) < o3tl::make_unsigned(GetOutputSizePixel().Width());
++nCol )
// is this column visible?
if ( mvCols[ nCol ]->IsFrozen() || nCol >= nFirstCol )
More information about the Libreoffice-commits
mailing list