diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-01-18 12:34:18 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-01-18 14:06:21 +0100 |
commit | 7dc50ca94ad6cc47561662424e163250a8e5957e (patch) | |
tree | b0a404c6ef7432d0967ef1afae0e4b8ac41c4cfd /vcl | |
parent | f150876698b5cea4857abcc5bd2e37fd4b038a17 (diff) |
Remove redundant casts
They had been added with d2986be1a8d896782b8cb846b0028eaa752e0384 "INTEGRATION:
CWS vcl83: #i82823# remove warnings (thanks pjanik)" before
dbbf365921b50009db8ea86b90c99f3a26c467bc "INTEGRATION: CWS vcl87: #i86882# use
long for gemoetry like the rest of the Sal interface does" changed the
SalFrameGeometry::n*Decoration members from 'unsinged int' to 'unsigned long'.
So back then the sums were of type
'long' + 'long' + 'long' + 'unsigned int' => 'long' or 'unsigned long'
(depending on whether 'long' is larger than 'int'), while now it is
'long' + 'long' + 'long' + 'unsigned long' => 'unsigned long'
Change-Id: Ia8c7a8ccd858675c909e39497256be7783a8fd2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87012
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/syswin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 9d2a0b671c66..5dbcd6852859 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -705,15 +705,15 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) if( std::abs(g.nX-aState.mnX) < 2 && std::abs(g.nY-aState.mnY) < 5 ) { long displacement = g.nTopDecoration ? g.nTopDecoration : 20; - if( static_cast<unsigned long>(aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > static_cast<unsigned long>(aDesktop.Right()) || - static_cast<unsigned long>(aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > static_cast<unsigned long>(aDesktop.Bottom()) ) + if( aState.mnX + displacement + aState.mnWidth + g.nRightDecoration > static_cast<unsigned long>(aDesktop.Right()) || + aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration > static_cast<unsigned long>(aDesktop.Bottom()) ) { // displacing would leave screen aState.mnX = g.nLeftDecoration ? g.nLeftDecoration : 10; // should result in (0,0) aState.mnY = displacement; if( bWrapped || - static_cast<unsigned long>(aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > static_cast<unsigned long>(aDesktop.Right()) || - static_cast<unsigned long>(aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > static_cast<unsigned long>(aDesktop.Bottom()) ) + aState.mnX + displacement + aState.mnWidth + g.nRightDecoration > static_cast<unsigned long>(aDesktop.Right()) || + aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration > static_cast<unsigned long>(aDesktop.Bottom()) ) break; // further displacement not possible -> break // avoid endless testing bWrapped = true; |