summaryrefslogtreecommitdiff
path: root/include/basegfx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-04-26 15:08:36 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-04-26 17:04:01 +0200
commitbdff0bb77b57def835fcaed3bded7519e69dc896 (patch)
treec330add464f566a32ebd82dd9ad29f91ba0d87f8 /include/basegfx
parent651527b4efe9700c8c8dff58ce5aa86ad5681f16 (diff)
Use o3tl::make_unsigned in some places
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I9665e6c2c4c5557f2d4cf1bb646f9fffc7bd7d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133442 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/basegfx')
-rw-r--r--include/basegfx/utils/unopolypolygon.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/basegfx/utils/unopolypolygon.hxx b/include/basegfx/utils/unopolypolygon.hxx
index 42da5921c7df..714036a3d101 100644
--- a/include/basegfx/utils/unopolypolygon.hxx
+++ b/include/basegfx/utils/unopolypolygon.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/rendering/XBezierPolyPolygon2D.hpp>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/basegfxdllapi.h>
+#include <o3tl/safeint.hxx>
namespace basegfx::unotools
{
@@ -73,7 +74,7 @@ namespace basegfx::unotools
/// Check whether index is a valid polygon index
void checkIndex( sal_Int32 nIndex ) const // throw (css::lang::IndexOutOfBoundsException);
{
- if( nIndex < 0 || nIndex >= static_cast<sal_Int32>(maPolyPoly.count()) )
+ if( nIndex < 0 || o3tl::make_unsigned(nIndex) >= maPolyPoly.count() )
throw css::lang::IndexOutOfBoundsException();
}