diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-04-24 13:10:56 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-04-24 13:11:29 +0200 |
commit | 44d9e4960e7a373350e44fb88be7a3a8c2a81cfd (patch) | |
tree | dbf2ec75a4481270277ccc156989288e714d5ba6 /include | |
parent | c1158fbc1c8abb0842fb8eb307724ef42ac6e8e2 (diff) |
Sequence::operator[]: let's cast the other side to unsigned too
Change-Id: I30845477e5dfbf5c90702bb0b6acb7955fcbe684
Diffstat (limited to 'include')
-rw-r--r-- | include/com/sun/star/uno/Sequence.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
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<sal_uInt32>(nIndex) < getLength()); + assert(nIndex >= 0 && static_cast<sal_uInt32>(nIndex) < static_cast<sal_uInt32>(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<sal_uInt32>(nIndex) < getLength()); + assert(nIndex >= 0 && static_cast<sal_uInt32>(nIndex) < static_cast<sal_uInt32>(getLength())); return reinterpret_cast< const E * >( _pSequence->elements )[ nIndex ]; } |