From 44d9e4960e7a373350e44fb88be7a3a8c2a81cfd Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 24 Apr 2014 13:10:56 +0200 Subject: Sequence::operator[]: let's cast the other side to unsigned too Change-Id: I30845477e5dfbf5c90702bb0b6acb7955fcbe684 --- include/com/sun/star/uno/Sequence.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/com/sun/star/uno/Sequence.hxx b/include/com/sun/star/uno/Sequence.hxx index 88fba66aa45b..347953c828e2 100644 --- a/include/com/sun/star/uno/Sequence.hxx +++ b/include/com/sun/star/uno/Sequence.hxx @@ -157,7 +157,7 @@ template< class E > inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) { // silence spurious -Werror=strict-overflow warnings from GCC 4.8.2 - assert(nIndex >= 0 && static_cast(nIndex) < getLength()); + assert(nIndex >= 0 && static_cast(nIndex) < static_cast(getLength())); return getArray()[ nIndex ]; } @@ -166,7 +166,7 @@ inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const SAL_THROW(()) { // silence spurious -Werror=strict-overflow warnings from GCC 4.8.2 - assert(nIndex >= 0 && static_cast(nIndex) < getLength()); + assert(nIndex >= 0 && static_cast(nIndex) < static_cast(getLength())); return reinterpret_cast< const E * >( _pSequence->elements )[ nIndex ]; } -- cgit