diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-06-02 09:45:26 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-06-02 11:21:53 +0200 |
commit | 470bc862796a517090448ca18622eca22550a0e4 (patch) | |
tree | e578503b1533c7070a11f2576dca69330fcd0674 /chart2/source/view | |
parent | e6de84d46c2a41fc4ae53e2744d432e50c4a4ac1 (diff) |
Use o3tl::make_unsigned, nPolygonIndex is already clamped to non-negative here
Change-Id: Idaf80e28f177c84faaec2c047db2b4435b9e7e15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135291
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'chart2/source/view')
-rw-r--r-- | chart2/source/view/main/Clipping.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chart2/source/view/main/Clipping.cxx b/chart2/source/view/main/Clipping.cxx index 7509f53fb28d..713e88c26bd0 100644 --- a/chart2/source/view/main/Clipping.cxx +++ b/chart2/source/view/main/Clipping.cxx @@ -21,6 +21,7 @@ #include <CommonConverters.hxx> #include <BaseGFXHelper.hxx> +#include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <com/sun/star/drawing/Position3D.hpp> @@ -217,7 +218,7 @@ void lcl_addPointToPoly( std::vector<std::vector<css::drawing::Position3D>>& rPo } //make sure that we have enough polygons - if(nPolygonIndex >= static_cast<sal_Int32>(rPoly.size()) ) + if(o3tl::make_unsigned(nPolygonIndex) >= rPoly.size() ) { rPoly.resize(nPolygonIndex+1); rResultPointCount.resize(nPolygonIndex+1,0); |