diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-01-28 13:10:14 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-01-28 15:07:52 +0100 |
commit | c43d6d6a3ac1a8a93b3e2ba2f549a7135848487f (patch) | |
tree | 10c67555cb6fe1d51a96b1611fbaf02db97c530c /vcl/osx | |
parent | 018bf569904e77e897b9b76f17a9b539cc415dcc (diff) |
loplugin:unsignedcompare (macOS)
Change-Id: Idaba1b3731ee551ca747b6b8eb6bf49e33fae415
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87604
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/osx')
-rw-r--r-- | vcl/osx/salframe.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index ce5ada142911..dc012aa1d07b 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -22,6 +22,7 @@ #include <comphelper/fileurl.hxx> #include <rtl/ustrbuf.hxx> #include <sal/log.hxx> +#include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <osl/file.h> @@ -576,17 +577,17 @@ SalEvent AquaSalFrame::PreparePosSize(long nX, long nY, long nWidth, long nHeigh if (nFlags & SAL_FRAME_POSSIZE_WIDTH) { maGeometry.nWidth = nWidth; - if (mnMaxWidth > 0 && maGeometry.nWidth > static_cast<unsigned int>(mnMaxWidth)) + if (mnMaxWidth > 0 && maGeometry.nWidth > o3tl::make_unsigned(mnMaxWidth)) maGeometry.nWidth = mnMaxWidth; - if (mnMinWidth > 0 && maGeometry.nWidth < static_cast<unsigned int>(mnMinWidth)) + if (mnMinWidth > 0 && maGeometry.nWidth < o3tl::make_unsigned(mnMinWidth)) maGeometry.nWidth = mnMinWidth; } if (nFlags & SAL_FRAME_POSSIZE_HEIGHT) { maGeometry.nHeight = nHeight; - if (mnMaxHeight > 0 && maGeometry.nHeight > static_cast<unsigned int>(mnMaxHeight)) + if (mnMaxHeight > 0 && maGeometry.nHeight > o3tl::make_unsigned(mnMaxHeight)) maGeometry.nHeight = mnMaxHeight; - if (mnMinHeight > 0 && maGeometry.nHeight < static_cast<unsigned int>(mnMinHeight)) + if (mnMinHeight > 0 && maGeometry.nHeight < o3tl::make_unsigned(mnMinHeight)) maGeometry.nHeight = mnMinHeight; } if (nEvent != SalEvent::NONE) @@ -783,7 +784,7 @@ void AquaSalFrame::doShowFullScreen( bool bFullScreen, sal_Int32 nDisplay ) NSArray* pScreens = [NSScreen screens]; if( pScreens ) { - if( nDisplay >= 0 && static_cast<unsigned int>(nDisplay) < [pScreens count] ) + if( nDisplay >= 0 && o3tl::make_unsigned(nDisplay) < [pScreens count] ) pScreen = [pScreens objectAtIndex: nDisplay]; else { |