summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-17 17:02:10 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-18 21:24:57 +0200
commit35dfb73889a084fc4a428071471429396a7d1287 (patch)
tree250393eb9b6aaeac501519477aca442e5465f82a /basegfx
parent57ecae2843c80d67ab9a3aaaf004fe131c4f13ae (diff)
cid#1607355 silence Overflowed constant
and cid#1607426 Overflowed constant cid#1608151 Overflowed constant cid#1608163 Overflowed constant cid#1608208 Overflowed constant cid#1608228 Overflowed constant cid#1608299 Overflowed constant cid#1608549 Overflowed constant cid#1607982 Overflowed constant cid#1608078 Overflowed return value Change-Id: Id4ccc03b610f4dcf7912c239c7c079da1aef4ba2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173615 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dsvgpolypolygon.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index fe4f646eb3ba..9728a3896de6 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -265,15 +265,17 @@ namespace basegfx::utils
}
// ensure existence of start point
- if(!aCurrPoly.count())
+ sal_uInt32 nCurrPolyCount = aCurrPoly.count();
+ if (nCurrPolyCount == 0)
{
aCurrPoly.append(B2DPoint(nLastX, nLastY));
+ nCurrPolyCount = 1;
}
// get first control point. It's the reflection of the PrevControlPoint
// of the last point. If not existent, use current point (see SVG)
B2DPoint aPrevControl(nLastX, nLastY);
- const sal_uInt32 nIndex(aCurrPoly.count() - 1);
+ const sal_uInt32 nIndex(nCurrPolyCount - 1);
if(aCurrPoly.areControlPointsUsed() && aCurrPoly.isPrevControlPointUsed(nIndex))
{