diff options
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/component.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/component_context.cxx | 6 | ||||
-rw-r--r-- | cppuhelper/source/exc_thrower.cxx | 10 | ||||
-rw-r--r-- | cppuhelper/source/implbase.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/source/interfacecontainer.cxx | 8 | ||||
-rw-r--r-- | cppuhelper/source/tdmgr.cxx | 14 | ||||
-rw-r--r-- | cppuhelper/source/weak.cxx | 10 |
7 files changed, 27 insertions, 27 deletions
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx index b9b97d953e8b..fdff1a21bab8 100644 --- a/cppuhelper/source/component.cxx +++ b/cppuhelper/source/component.cxx @@ -101,7 +101,7 @@ void OComponentHelper::release() throw() } // only the alive ref holds the object - assert( m_refCount == 1 ); + OSL_ASSERT( m_refCount == 1 ); // destroy the object if xHoldAlive decrement the refcount to 0 return; } diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index d3bbeea5f3b9..2df1b495689c 100644 --- a/cppuhelper/source/component_context.cxx +++ b/cppuhelper/source/component_context.cxx @@ -85,7 +85,7 @@ class DisposingForwarder explicit DisposingForwarder( Reference< lang::XComponent > const & xTarget ) : m_xTarget( xTarget ) { - assert( m_xTarget.is() ); + OSL_ASSERT( m_xTarget.is() ); } public: // listens at source for disposing, then disposes target @@ -532,7 +532,7 @@ ComponentContext::ComponentContext( UNO_QUERY ); // patch DefaultContext property of new one Reference< beans::XPropertySet > xProps( m_xSMgr, UNO_QUERY ); - assert( xProps.is() ); + OSL_ASSERT( xProps.is() ); if (xProps.is()) { Reference< XComponentContext > xThis( this ); @@ -545,7 +545,7 @@ ComponentContext::ComponentContext( throw; } osl_atomic_decrement( &m_refCount ); - assert( m_xSMgr.is() ); + OSL_ASSERT( m_xSMgr.is() ); } } } diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx index de05ab727215..8bd5084c7e8c 100644 --- a/cppuhelper/source/exc_thrower.cxx +++ b/cppuhelper/source/exc_thrower.cxx @@ -75,7 +75,7 @@ void SAL_CALL ExceptionThrower_dispatch( uno_Interface * pUnoI, typelib_TypeDescription const * pMemberType, void * pReturn, void * pArgs [], uno_Any ** ppException ) { - assert( pMemberType->eTypeClass == typelib_TypeClass_INTERFACE_METHOD ); + OSL_ASSERT( pMemberType->eTypeClass == typelib_TypeClass_INTERFACE_METHOD ); switch (reinterpret_cast< typelib_InterfaceMemberTypeDescription * >( const_cast< typelib_TypeDescription * >( pMemberType ) )-> @@ -109,13 +109,13 @@ void SAL_CALL ExceptionThrower_dispatch( case 3: // throwException() { uno_Any * pAny = static_cast< uno_Any * >( pArgs[ 0 ] ); - assert( pAny->pType->eTypeClass == typelib_TypeClass_EXCEPTION ); + OSL_ASSERT( pAny->pType->eTypeClass == typelib_TypeClass_EXCEPTION ); uno_type_any_construct( *ppException, pAny->pData, pAny->pType, nullptr ); break; } default: { - assert( false ); + OSL_ASSERT( false ); RuntimeException exc( "not implemented!" ); uno_type_any_construct( *ppException, &exc, cppu::UnoType<decltype(exc)>::get().getTypeLibType(), nullptr ); @@ -198,7 +198,7 @@ void SAL_CALL throwException( Any const & exc ) reinterpret_cast< void ** >( &xThrower ), static_cast< uno_Interface * >( &theExceptionThrower::get() ), ExceptionThrower::getCppuType() ); - assert( xThrower.is() ); + OSL_ASSERT( xThrower.is() ); xThrower->throwException( exc ); } @@ -226,7 +226,7 @@ Any SAL_CALL getCaughtException() cpp2uno.mapInterface( reinterpret_cast< void ** >( &unoI.m_pUnoI ), static_cast< XExceptionThrower * >( &theExceptionThrower::get() ), pTD ); - assert( unoI.is() ); + OSL_ASSERT( unoI.is() ); typelib_TypeDescription * pMemberTD = nullptr; TYPELIB_DANGER_GET( diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx index 596508e213a8..6118ccb79fc1 100644 --- a/cppuhelper/source/implbase.cxx +++ b/cppuhelper/source/implbase.cxx @@ -82,7 +82,7 @@ void WeakComponentImplHelperBase::release() exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); static_cast<void>(exc); } - assert( rBHelper.bDisposed ); + OSL_ASSERT( rBHelper.bDisposed ); } OWeakObject::release(); } @@ -209,7 +209,7 @@ void WeakAggComponentImplHelperBase::release() exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); static_cast<void>(exc); } - assert( rBHelper.bDisposed ); + OSL_ASSERT( rBHelper.bDisposed ); } OWeakAggObject::release(); } diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx index 0571c4c87e66..2eb7197bf9e6 100644 --- a/cppuhelper/source/interfacecontainer.cxx +++ b/cppuhelper/source/interfacecontainer.cxx @@ -126,14 +126,14 @@ void OInterfaceIteratorHelper::remove() { if( bIsList ) { - assert( nRemain >= 0 && + OSL_ASSERT( nRemain >= 0 && nRemain < aData.pAsSequence->getLength() ); XInterface * p = aData.pAsSequence->getConstArray()[nRemain].get(); rCont.removeInterface( * reinterpret_cast< const Reference< XInterface > * >( &p ) ); } else { - assert( 0 == nRemain ); + OSL_ASSERT( 0 == nRemain ); rCont.removeInterface( * reinterpret_cast< const Reference< XInterface > * >(&aData.pAsInterface)); } } @@ -195,7 +195,7 @@ void OInterfaceContainerHelper::copyAndResetInUse() sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> & rListener ) { - assert( rListener.is() ); + OSL_ASSERT( rListener.is() ); MutexGuard aGuard( rMutex ); if( bInUse ) copyAndResetInUse(); @@ -226,7 +226,7 @@ sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> & sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface> & rListener ) { - assert( rListener.is() ); + OSL_ASSERT( rListener.is() ); MutexGuard aGuard( rMutex ); if( bInUse ) copyAndResetInUse(); diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx index 9a5b7f6cba58..02da05163732 100644 --- a/cppuhelper/source/tdmgr.cxx +++ b/cppuhelper/source/tdmgr.cxx @@ -155,11 +155,11 @@ inline static typelib_TypeDescription * createCTD( Reference< XStructTypeDescription > templateDesc( access->getByHierarchicalName(aTypeName.copy(0, i)), UNO_QUERY_THROW); - assert( + OSL_ASSERT( templateDesc->getTypeParameters().getLength() == xType->getTypeArguments().getLength()); templateMemberTypes = templateDesc->getMemberTypes(); - assert(templateMemberTypes.getLength() == nMembers); + OSL_ASSERT(templateMemberTypes.getLength() == nMembers); } sal_Int32 nPos; @@ -212,7 +212,7 @@ inline static typelib_TypeDescription * createCTD( xAttribute->getGetExceptions() ); for (sal_Int32 i = 0; i != getExcs.getLength(); ++i) { - assert( getExcs[i].is() ); + OSL_ASSERT( getExcs[i].is() ); getExc.push_back( getExcs[i]->getName().pData ); } std::vector< rtl_uString * > setExc; @@ -220,7 +220,7 @@ inline static typelib_TypeDescription * createCTD( xAttribute->getSetExceptions() ); for (sal_Int32 i = 0; i != setExcs.getLength(); ++i) { - assert( setExcs[i].is() ); + OSL_ASSERT( setExcs[i].is() ); setExc.push_back( setExcs[i]->getName().pData ); } typelib_typedescription_newExtendedInterfaceAttribute( @@ -322,7 +322,7 @@ inline static typelib_TypeDescription * createCTD( new typelib_TypeDescription *[nBases]); for (sal_Int32 i = 0; i < nBases; ++i) { typelib_TypeDescription * p = createCTD(access, aBases[i]); - assert( + OSL_ASSERT( !TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK(p->eTypeClass)); typelib_typedescription_register(&p); aBaseTypes[i] = p; @@ -380,7 +380,7 @@ inline static typelib_TypeDescription * createCTD( const Reference< XEnumTypeDes { OUString aTypeName( xType->getName() ); Sequence< OUString > aNames( xType->getEnumNames() ); - assert( sizeof(OUString) == sizeof(rtl_uString *) ); // !!! + OSL_ASSERT( sizeof(OUString) == sizeof(rtl_uString *) ); // !!! Sequence< sal_Int32 > aValues( xType->getEnumValues() ); typelib_typedescription_newEnum( @@ -621,7 +621,7 @@ public: void EventListenerImpl::disposing( lang::EventObject const & rEvt ) { if (rEvt.Source != m_xTDMgr) { - assert(false); + OSL_ASSERT(false); } // deregister of c typelib callback ::typelib_typedescription_revokeCallback( m_xTDMgr.get(), typelib_callback ); diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx index 981867ec5162..b52634b26ecc 100644 --- a/cppuhelper/source/weak.cxx +++ b/cppuhelper/source/weak.cxx @@ -383,7 +383,7 @@ OWeakRefListener::OWeakRefListener(const Reference< XInterface >& xInt) } } } - catch (RuntimeException &) { assert( false ); } // assert here, but no unexpected() + catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected() osl_atomic_decrement( &m_aRefCount ); } @@ -397,7 +397,7 @@ OWeakRefListener::~OWeakRefListener() m_XWeakConnectionPoint->removeReference(static_cast<XReference*>(this)); } } - catch (RuntimeException &) { assert( false ); } // assert here, but no unexpected() + catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected() } // XInterface @@ -471,7 +471,7 @@ void WeakReferenceHelper::clear() m_pImpl = nullptr; } } - catch (RuntimeException &) { assert( false ); } // assert here, but no unexpected() + catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected() } WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& rWeakRef) @@ -504,7 +504,7 @@ WeakReferenceHelper::operator= (const Reference< XInterface > & xInt) m_pImpl->acquire(); } } - catch (RuntimeException &) { assert( false ); } // assert here, but no unexpected() + catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected() return *this; } @@ -530,7 +530,7 @@ Reference< XInterface > WeakReferenceHelper::get() const } catch (RuntimeException &) { - assert( false ); + OSL_ASSERT( false ); } // assert here, but no unexpected() return Reference< XInterface >(); |