From d55155cad0926f61b5745260196b93e95471d06a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 15 Jan 2013 11:24:46 +0100 Subject: Include Also, move assert into uno_type_sequence_construct so that all its callers benefit. Also, change some OSL_ENSURE to assert. Change-Id: Idd0a03c4aa6eed1db453db84602c01ff16f0d72c --- cppu/inc/com/sun/star/uno/Sequence.hxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'cppu/inc') 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 + #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 ]; } -- cgit