summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-01-23 11:04:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-01-23 14:08:38 +0100
commit48f32d77f914fb880fc023365c4e2910e741a7b9 (patch)
treeb72da339f97f2ea8c6414ed7c4e66d40dbd6aa7a /vcl
parentb650fe8a75e34d109764b25527e034845f6445e1 (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/headless/svpframe.cxx9
1 files changed, 5 insertions, 4 deletions
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