diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-04-26 15:08:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-04-26 17:04:01 +0200 |
commit | bdff0bb77b57def835fcaed3bded7519e69dc896 (patch) | |
tree | c330add464f566a32ebd82dd9ad29f91ba0d87f8 /cppuhelper | |
parent | 651527b4efe9700c8c8dff58ce5aa86ad5681f16 (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 'cppuhelper')
-rw-r--r-- | cppuhelper/source/interfacecontainer.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx index 035f93848bf2..c97a8ba9908c 100644 --- a/cppuhelper/source/interfacecontainer.cxx +++ b/cppuhelper/source/interfacecontainer.cxx @@ -22,6 +22,7 @@ #include <cppuhelper/propshlp.hxx> #include <comphelper/sequence.hxx> +#include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <osl/mutex.hxx> #include <sal/log.hxx> @@ -106,7 +107,7 @@ void OInterfaceIteratorHelper::remove() if( bIsList ) { OSL_ASSERT( nRemain >= 0 && - nRemain < static_cast<sal_Int32>(aData.pAsVector->size()) ); + o3tl::make_unsigned(nRemain) < aData.pAsVector->size() ); XInterface * p = (*aData.pAsVector)[nRemain].get(); rCont.removeInterface( * reinterpret_cast< const Reference< XInterface > * >( &p ) ); } |