diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-12-01 21:12:20 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-12-01 21:26:52 +0100 |
commit | abc84c73502210603926ee8083a7c37bcceebaa4 (patch) | |
tree | 8b83975ab96d110292c1d72a9d6b869157d45e0b /vcl/source/gdi/region.cxx | |
parent | 68e841326a87004968b07b3ae522a0c312519f25 (diff) |
tdf#120703 PVS: do not split a band that is just one pixel high
This is what mentioned in the comment to the line, so implement just that
V560 A part of conditional expression is always true:
pBand->mnYTop < pBand->mnYBottom.
Change-Id: I1027a30a07d49940a31838deddb457b6379eb887
Reviewed-on: https://gerrit.libreoffice.org/64399
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/source/gdi/region.cxx')
-rw-r--r-- | vcl/source/gdi/region.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index b363cd019b40..ce963a977dbc 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -146,7 +146,7 @@ namespace // this allows the lowest pixel of the band to be split off && pBand->mnYBottom>=nTop // do not split a band that is just one pixel high - && pBand->mnYTop<pBand->mnYBottom) + && pBand->mnYTop<pBand->mnYBottom-1) { // Split the top band. pTopBand = pBand->SplitBand(nTop); @@ -163,7 +163,7 @@ namespace // prevent splitting off a band that is 0 pixel high && pBand->mnYBottom>nBottom // do not split a band that is just one pixel high - && pBand->mnYTop<pBand->mnYBottom) + && pBand->mnYTop<pBand->mnYBottom-1) { // Split the bottom band. pBand->SplitBand(nBottom+1); |