vcl/headless/svpframe.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 48f32d77f914fb880fc023365c4e2910e741a7b9
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Jan 23 11:04:56 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Thu Jan 23 14:08:38 2020 +0100

    Avoid explicit casts to smaller unsigned int from larger long
    
    ...in what might be attempts to avoid warnings about signed vs. unsigned
    comparisons.  (The mismatch had been there ever since
    b6801926b515be4cfb10ca7e3322939f0f97426b "INTEGRATION: CWS mergesvp: 
#i78931#
    contribute svp sources".)
    
    Change-Id: Ibf7e8616740024dd02c4c2886785fb8c9d9cadde
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87251
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 20876ef2ff0a..0f6da8d2872f 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <comphelper/lok.hxx>
+#include <o3tl/safeint.hxx>
 #include <vcl/syswin.hxx>
 #include <sal/log.hxx>
 
@@ -237,17 +238,17 @@ void SvpSalFrame::SetPosSize( long nX, long nY, long 
nWidth, long nHeight, sal_u
     if( (nFlags & SAL_FRAME_POSSIZE_WIDTH) != 0 )
     {
         maGeometry.nWidth = nWidth;
-        if( m_nMaxWidth > 0 && maGeometry.nWidth > static_cast<unsigned 
int>(m_nMaxWidth) )
+        if( m_nMaxWidth > 0 && maGeometry.nWidth > 
o3tl::make_unsigned(m_nMaxWidth) )
             maGeometry.nWidth = m_nMaxWidth;
-        if( m_nMinWidth > 0 && maGeometry.nWidth < static_cast<unsigned 
int>(m_nMinWidth) )
+        if( m_nMinWidth > 0 && maGeometry.nWidth < 
o3tl::make_unsigned(m_nMinWidth) )
             maGeometry.nWidth = m_nMinWidth;
     }
     if( (nFlags & SAL_FRAME_POSSIZE_HEIGHT) != 0 )
     {
         maGeometry.nHeight = nHeight;
-        if( m_nMaxHeight > 0 && maGeometry.nHeight > static_cast<unsigned 
int>(m_nMaxHeight) )
+        if( m_nMaxHeight > 0 && maGeometry.nHeight > 
o3tl::make_unsigned(m_nMaxHeight) )
             maGeometry.nHeight = m_nMaxHeight;
-        if( m_nMinHeight > 0 && maGeometry.nHeight < static_cast<unsigned 
int>(m_nMinHeight) )
+        if( m_nMinHeight > 0 && maGeometry.nHeight < 
o3tl::make_unsigned(m_nMinHeight) )
             maGeometry.nHeight = m_nMinHeight;
     }
 #ifndef IOS
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to