diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-03-06 19:46:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-03-06 22:14:06 +0100 |
commit | 749897d308c41cd5c92eccdd9fc7a5becbcea33c (patch) | |
tree | d83172054271fc4e9d54d6f2e2f26d7c84b3f72d /drawinglayer | |
parent | 530d4cfa3ce3d1276305da4dc578890abba065cb (diff) |
cid#1460477 Result is not floating-point
warnings is about
aRange.getMinX()-nRadius/2
"
CID 1460477 (#1 of 1): Result is not floating-point (UNINTENDED_INTEGER_DIVISION)
integer_division: Dividing integer expressions 5 and 2, and then converting the
integer quotient to type double. Any remainder, or fractional part of the
quotient, is ignored.
To compute and use a non-integer quotient, change or cast either operand to
type double. If integer division is intended, consider indicating that by
casting the result to type int
"
Change-Id: I600d909c52b9e86f5193806d42cfd0421d8fc2cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90132
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 8cff84f3d3bf..238cf4c354ad 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -364,7 +364,7 @@ namespace drawinglayer::processor2d // obtain result as a bitmap auto bitmap = mpOutputDevice->GetBitmapEx(Point(aRange.getMinX(), aRange.getMinY()), Size(aRange.getWidth(), aRange.getHeight())); - constexpr sal_Int32 nRadius = 5; + constexpr double nRadius = 5.0; bitmap.Scale(Size(aRange.getWidth()-nRadius, aRange.getHeight()-nRadius)); // use bitmap later as mask auto mask = bitmap.GetBitmap(); |