summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-08-10 13:07:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-08-10 14:43:34 +0200
commit98617d958da903fa1bc849dce50ffba6e2c035ff (patch)
tree87eb67e4d0989e12eb171bf4c2de2841afc41642 /vcl
parent71074815b80282009923edef75f95ba7f0424c57 (diff)
Silence -Werror,-Wimplicit-int-float-conversion
> vcl/source/window/window2.cxx:588:20: error: implicit conversion from 'long' to 'double' changes value from -9223372036854775807 to -9223372036854775808 [-Werror,-Wimplicit-int-float-conversion] > if ( nN == -LONG_MAX ) > ~~ ^~~~~~~~~ etc. with Clang 10 Change-Id: I272e8fc373a91630f1c48a2b0ad7a265c5370bcf Reviewed-on: https://gerrit.libreoffice.org/77241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/window2.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index a9d7c042a21a..636eb14b3854 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -585,9 +585,9 @@ static void lcl_HandleScrollHelper( ScrollBar* pScrl, double nN, bool isMultiply
{
long nNewPos = pScrl->GetThumbPos();
- if ( nN == -LONG_MAX )
+ if ( nN == double(-LONG_MAX) )
nNewPos += pScrl->GetPageSize();
- else if ( nN == LONG_MAX )
+ else if ( nN == double(LONG_MAX) )
nNewPos -= pScrl->GetPageSize();
else
{
@@ -657,9 +657,9 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
if ( nScrollLines == COMMAND_WHEEL_PAGESCROLL )
{
if ( pData->GetDelta() < 0 )
- nLines = -LONG_MAX;
+ nLines = double(-LONG_MAX);
else
- nLines = LONG_MAX;
+ nLines = double(LONG_MAX);
}
else
nLines = pData->GetNotchDelta() * nScrollLines;