diff options
Diffstat (limited to 'cppu/inc')
-rw-r--r-- | cppu/inc/com/sun/star/uno/Sequence.hxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/cppu/inc/com/sun/star/uno/Sequence.hxx b/cppu/inc/com/sun/star/uno/Sequence.hxx index 3a006a654e5c..a23fd3b48225 100644 --- a/cppu/inc/com/sun/star/uno/Sequence.hxx +++ b/cppu/inc/com/sun/star/uno/Sequence.hxx @@ -19,7 +19,10 @@ #ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ #define _COM_SUN_STAR_UNO_SEQUENCE_HXX_ -#include "osl/diagnose.h" +#include "sal/config.h" + +#include <cassert> + #include "osl/interlck.h" #include "com/sun/star/uno/Sequence.h" #include "typelib/typedescription.h" @@ -89,7 +92,6 @@ inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len ) template< class E > inline Sequence< E >::Sequence( sal_Int32 len ) { - assert( len >= 0 ); const Type & rType = ::cppu::getTypeFavourUnsigned( this ); #if ! defined EXCEPTIONS_OFF sal_Bool success = @@ -167,9 +169,7 @@ inline E * Sequence< E >::getArray() template< class E > inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) { - OSL_ENSURE( - nIndex >= 0 && nIndex < getLength(), - "### illegal index of sequence!" ); + assert( nIndex >= 0 && nIndex < getLength() ); return getArray()[ nIndex ]; } @@ -178,9 +178,7 @@ template< class E > inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const SAL_THROW(()) { - OSL_ENSURE( - nIndex >= 0 && nIndex < getLength(), - "### illegal index of sequence!" ); + assert( nIndex >= 0 && nIndex < getLength() ); return reinterpret_cast< const E * >( _pSequence->elements )[ nIndex ]; } |