summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 17:03:35 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 17:03:35 +1000
commit97eb00c75e173d4c8d0b483a7941ad3d2f23783e (patch)
tree7974a8b9423c56982646366b0859dfb2a1a88d50 /cppu
parentd0a99cc2ed76be220f7e868e332ba19f6e48a440 (diff)
revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/AffineBridge/AffineBridge.cxx14
-rw-r--r--cppu/source/LogBridge/LogBridge.cxx8
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx4
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx2
-rw-r--r--cppu/source/threadpool/current.cxx14
-rw-r--r--cppu/source/threadpool/jobqueue.cxx2
-rw-r--r--cppu/source/threadpool/thread.cxx2
-rw-r--r--cppu/source/threadpool/threadident.cxx8
-rw-r--r--cppu/source/threadpool/threadpool.cxx14
-rw-r--r--cppu/source/typelib/typelib.cxx68
-rw-r--r--cppu/source/uno/assign.hxx2
-rw-r--r--cppu/source/uno/cascade_mapping.cxx2
-rw-r--r--cppu/source/uno/constr.hxx2
-rw-r--r--cppu/source/uno/copy.hxx8
-rw-r--r--cppu/source/uno/destr.hxx2
-rw-r--r--cppu/source/uno/eq.hxx4
-rw-r--r--cppu/source/uno/lbenv.cxx14
-rw-r--r--cppu/source/uno/lbmap.cxx10
-rw-r--r--cppu/source/uno/sequence.cxx14
19 files changed, 97 insertions, 97 deletions
diff --git a/cppu/source/AffineBridge/AffineBridge.cxx b/cppu/source/AffineBridge/AffineBridge.cxx
index 0ae89bb71582..6d194517bf56 100644
--- a/cppu/source/AffineBridge/AffineBridge.cxx
+++ b/cppu/source/AffineBridge/AffineBridge.cxx
@@ -174,8 +174,8 @@ AffineBridge::~AffineBridge()
void AffineBridge::outerDispatch(bool loop)
{
- assert(m_outerThreadId == osl::Thread::getCurrentIdentifier());
- assert(m_innerThreadId != m_outerThreadId);
+ OSL_ASSERT(m_outerThreadId == osl::Thread::getCurrentIdentifier());
+ OSL_ASSERT(m_innerThreadId != m_outerThreadId);
Msg mm;
@@ -213,8 +213,8 @@ void AffineBridge::outerDispatch(bool loop)
void AffineBridge::innerDispatch()
{
- assert(m_innerThreadId == osl::Thread::getCurrentIdentifier());
- assert(m_innerThreadId != m_outerThreadId);
+ OSL_ASSERT(m_innerThreadId == osl::Thread::getCurrentIdentifier());
+ OSL_ASSERT(m_innerThreadId != m_outerThreadId);
Msg mm;
@@ -275,7 +275,7 @@ void AffineBridge::v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam)
void AffineBridge::v_callOut_v(uno_EnvCallee * pCallee, va_list * pParam)
{
- assert(m_innerThreadId);
+ OSL_ASSERT(m_innerThreadId);
osl::MutexGuard guard(m_innerMutex);
@@ -310,14 +310,14 @@ void AffineBridge::v_enter()
if (!m_enterCount)
m_innerThreadId = osl::Thread::getCurrentIdentifier();
- assert(m_innerThreadId == osl::Thread::getCurrentIdentifier());
+ OSL_ASSERT(m_innerThreadId == osl::Thread::getCurrentIdentifier());
++ m_enterCount;
}
void AffineBridge::v_leave()
{
- assert(m_innerThreadId == osl::Thread::getCurrentIdentifier());
+ OSL_ASSERT(m_innerThreadId == osl::Thread::getCurrentIdentifier());
-- m_enterCount;
if (!m_enterCount)
diff --git a/cppu/source/LogBridge/LogBridge.cxx b/cppu/source/LogBridge/LogBridge.cxx
index b5d72a6771f1..604369d85186 100644
--- a/cppu/source/LogBridge/LogBridge.cxx
+++ b/cppu/source/LogBridge/LogBridge.cxx
@@ -62,7 +62,7 @@ LogBridge::LogBridge()
LogBridge::~LogBridge()
{
- assert(m_count >= 0);
+ OSL_ASSERT(m_count >= 0);
}
void LogBridge::v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam)
@@ -74,7 +74,7 @@ void LogBridge::v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam)
void LogBridge::v_callOut_v(uno_EnvCallee * pCallee, va_list * pParam)
{
- assert(m_count > 0);
+ OSL_ASSERT(m_count > 0);
-- m_count;
pCallee(pParam);
@@ -88,7 +88,7 @@ void LogBridge::v_enter()
{
m_mutex.acquire();
- assert(m_count >= 0);
+ OSL_ASSERT(m_count >= 0);
if (m_count == 0)
m_threadId = osl::Thread::getCurrentIdentifier();
@@ -98,7 +98,7 @@ void LogBridge::v_enter()
void LogBridge::v_leave()
{
- assert(m_count > 0);
+ OSL_ASSERT(m_count > 0);
-- m_count;
if (!m_count)
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
index dfafe2b181dc..8f46ce7a875a 100644
--- a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
+++ b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
@@ -146,7 +146,7 @@ void Mapping::mapInterface(
uno_Interface * pUnoI,
typelib_InterfaceTypeDescription * pTypeDescr)
{
- assert(ppOut && pTypeDescr);
+ OSL_ASSERT(ppOut && pTypeDescr);
if (*ppOut)
{
(*ppOut)->release(*ppOut);
@@ -160,7 +160,7 @@ void Mapping::mapInterface(
// need to enter environment because of potential "queryInterface" call
rtl_uString * pOId = nullptr;
uno_Environment_invoke(m_from.get(), s_getIdentifier_v, m_from.get(), &pOId, pUnoI);
- assert(pOId);
+ OSL_ASSERT(pOId);
// try to get any known interface from target environment
m_to.get()->pExtEnv->getRegisteredInterface(m_to.get()->pExtEnv, reinterpret_cast<void **>(ppOut), pOId, pTypeDescr);
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
index ca0fffd2f4ab..0b81cea8130d 100644
--- a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
+++ b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
@@ -312,7 +312,7 @@ void Proxy::acquire()
Proxy_free,
m_aOId.pData,
m_pTypeDescr);
- assert(pThis == this);
+ OSL_ASSERT(pThis == this);
}
if (m_probeFun)
diff --git a/cppu/source/threadpool/current.cxx b/cppu/source/threadpool/current.cxx
index be679ef65c6f..1b82a02d30cc 100644
--- a/cppu/source/threadpool/current.cxx
+++ b/cppu/source/threadpool/current.cxx
@@ -181,7 +181,7 @@ extern "C" sal_Bool SAL_CALL uno_setCurrentContext(
SAL_THROW_EXTERN_C()
{
IdContainer * pId = getIdContainer();
- assert( pId );
+ OSL_ASSERT( pId );
// free old one
if (pId->pCurrentContext)
@@ -199,7 +199,7 @@ extern "C" sal_Bool SAL_CALL uno_setCurrentContext(
{
uno_Environment * pEnv = nullptr;
::uno_getEnvironment( &pEnv, pEnvTypeName, pEnvContext );
- assert( pEnv && pEnv->pExtEnv );
+ OSL_ASSERT( pEnv && pEnv->pExtEnv );
if (pEnv)
{
if (pEnv->pExtEnv)
@@ -228,7 +228,7 @@ extern "C" sal_Bool SAL_CALL uno_getCurrentContext(
SAL_THROW_EXTERN_C()
{
IdContainer * pId = getIdContainer();
- assert( pId );
+ OSL_ASSERT( pId );
Environment target_env;
@@ -236,11 +236,11 @@ extern "C" sal_Bool SAL_CALL uno_getCurrentContext(
if (*ppCurrentContext)
{
target_env = Environment(rtl::OUString(pEnvTypeName), pEnvContext);
- assert( target_env.is() );
+ OSL_ASSERT( target_env.is() );
if (! target_env.is())
return false;
uno_ExtEnvironment * pEnv = target_env.get()->pExtEnv;
- assert( nullptr != pEnv );
+ OSL_ASSERT( nullptr != pEnv );
if (nullptr == pEnv)
return false;
(*pEnv->releaseInterface)( pEnv, *ppCurrentContext );
@@ -255,13 +255,13 @@ extern "C" sal_Bool SAL_CALL uno_getCurrentContext(
if (! target_env.is())
{
target_env = Environment(rtl::OUString(pEnvTypeName), pEnvContext);
- assert( target_env.is() );
+ OSL_ASSERT( target_env.is() );
if (! target_env.is())
return false;
}
Mapping mapping(&pId->pCurrentContextEnv->aBase, target_env.get());
- assert( mapping.is() );
+ OSL_ASSERT( mapping.is() );
if (! mapping.is())
return false;
diff --git a/cppu/source/threadpool/jobqueue.cxx b/cppu/source/threadpool/jobqueue.cxx
index 81246cf25111..2d375dcf8bbd 100644
--- a/cppu/source/threadpool/jobqueue.cxx
+++ b/cppu/source/threadpool/jobqueue.cxx
@@ -89,7 +89,7 @@ namespace cppu_threadpool {
break;
}
- assert(!m_lstJob.empty());
+ OSL_ASSERT( ! m_lstJob.empty() );
if( ! m_lstJob.empty() )
{
job = m_lstJob.front();
diff --git a/cppu/source/threadpool/thread.cxx b/cppu/source/threadpool/thread.cxx
index 09ad6442c84f..8dfa93bd443f 100644
--- a/cppu/source/threadpool/thread.cxx
+++ b/cppu/source/threadpool/thread.cxx
@@ -157,7 +157,7 @@ namespace cppu_threadpool {
{
if ( !uno_bindIdToCurrentThread( m_aThreadId.getHandle() ) )
{
- assert(false);
+ OSL_ASSERT( false );
}
}
diff --git a/cppu/source/threadpool/threadident.cxx b/cppu/source/threadpool/threadident.cxx
index e27fcac87269..24037f6e4d2e 100644
--- a/cppu/source/threadpool/threadident.cxx
+++ b/cppu/source/threadpool/threadident.cxx
@@ -84,9 +84,9 @@ extern "C" void SAL_CALL uno_releaseIdFromCurrentThread()
SAL_THROW_EXTERN_C()
{
IdContainer *p = getIdContainer();
- assert( p );
- assert( p->bInit );
- assert( p->nRefCountOfCurrentId );
+ OSL_ASSERT( p );
+ OSL_ASSERT( p->bInit );
+ OSL_ASSERT( p->nRefCountOfCurrentId );
p->nRefCountOfCurrentId --;
if( ! p->nRefCountOfCurrentId && (p->pLocalThreadId != p->pCurrentId) )
@@ -110,7 +110,7 @@ extern "C" sal_Bool SAL_CALL uno_bindIdToCurrentThread( sal_Sequence *pThreadId
}
else
{
- assert( 0 == p->nRefCountOfCurrentId );
+ OSL_ASSERT( 0 == p->nRefCountOfCurrentId );
if( 0 == p->nRefCountOfCurrentId )
{
rtl_byte_sequence_assign(&( p->pCurrentId ), pThreadId );
diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx
index 853325bb69f3..a508f56e6aec 100644
--- a/cppu/source/threadpool/threadpool.cxx
+++ b/cppu/source/threadpool/threadpool.cxx
@@ -158,7 +158,7 @@ namespace cppu_threadpool
// thread wasn't reused, remove it from the list
WaitingThreadList::iterator ii = find(
m_lstThreads.begin(), m_lstThreads.end(), &waitingThread );
- assert( ii != m_lstThreads.end() );
+ OSL_ASSERT( ii != m_lstThreads.end() );
m_lstThreads.erase( ii );
}
}
@@ -212,7 +212,7 @@ namespace cppu_threadpool
MutexGuard guard( m_mutex );
ThreadIdHashMap::iterator ii = m_mapQueue.find( aThreadId );
- assert( ii != m_mapQueue.end() );
+ OSL_ASSERT( ii != m_mapQueue.end() );
if( bAsynchron )
{
@@ -266,7 +266,7 @@ namespace cppu_threadpool
{
m_mapQueue[ aThreadId ] = pair < JobQueue * , JobQueue * > ( nullptr , nullptr );
ii = m_mapQueue.find( aThreadId );
- assert( ii != m_mapQueue.end() );
+ OSL_ASSERT( ii != m_mapQueue.end() );
}
if( bAsynchron )
@@ -323,11 +323,11 @@ namespace cppu_threadpool
ThreadIdHashMap::iterator ii = m_mapQueue.find( aThreadId );
- assert( ii != m_mapQueue.end() );
+ OSL_ASSERT( ii != m_mapQueue.end() );
pQueue = (*ii).second.first;
}
- assert( pQueue );
+ OSL_ASSERT( pQueue );
void *pReturn = pQueue->enter( nDisposeId );
if( pQueue->isCallstackEmpty() )
@@ -477,12 +477,12 @@ uno_threadpool_destroy( uno_ThreadPool hPool ) SAL_THROW_EXTERN_C()
bool empty;
{
- assert( g_pThreadpoolHashSet );
+ OSL_ASSERT( g_pThreadpoolHashSet );
MutexGuard guard( Mutex::getGlobalMutex() );
ThreadpoolHashSet::iterator ii = g_pThreadpoolHashSet->find( hPool );
- assert( ii != g_pThreadpoolHashSet->end() );
+ OSL_ASSERT( ii != g_pThreadpoolHashSet->end() );
g_pThreadpoolHashSet->erase( ii );
delete hPool;
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 4c75593558a8..f869e795c077 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -100,7 +100,7 @@ static inline bool reallyWeak( typelib_TypeClass eTypeClass )
static inline sal_Int32 getDescriptionSize( typelib_TypeClass eTypeClass )
{
- assert( typelib_TypeClass_TYPEDEF != eTypeClass );
+ OSL_ASSERT( typelib_TypeClass_TYPEDEF != eTypeClass );
sal_Int32 nSize;
// The reference is the description
@@ -275,7 +275,7 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl()
i != ppTDR.end(); ++i )
{
typelib_TypeDescriptionReference * pTDR = *i;
- assert( pTDR->nRefCount > pTDR->nStaticRefCount );
+ OSL_ASSERT( pTDR->nRefCount > pTDR->nStaticRefCount );
pTDR->nRefCount -= pTDR->nStaticRefCount;
if( pTDR->pType && !pTDR->pType->bOnDemand )
@@ -381,7 +381,7 @@ static inline void typelib_typedescription_initTables(
{
typelib_TypeDescription * pM = nullptr;
TYPELIB_DANGER_GET( &pM, pITD->ppAllMembers[i] );
- assert( pM );
+ OSL_ASSERT( pM );
if (pM)
{
aReadWriteAttributes[i] = !reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>(pM)->bReadOnly;
@@ -457,7 +457,7 @@ void freeTypeDescription(typelib_TypeDescription const * desc) {
bool complete(typelib_TypeDescription ** ppTypeDescr, bool initTables) {
if (! (*ppTypeDescr)->bComplete)
{
- assert( (typelib_TypeClass_STRUCT == (*ppTypeDescr)->eTypeClass ||
+ OSL_ASSERT( (typelib_TypeClass_STRUCT == (*ppTypeDescr)->eTypeClass ||
typelib_TypeClass_EXCEPTION == (*ppTypeDescr)->eTypeClass ||
typelib_TypeClass_ENUM == (*ppTypeDescr)->eTypeClass ||
typelib_TypeClass_INTERFACE == (*ppTypeDescr)->eTypeClass) &&
@@ -482,12 +482,12 @@ bool complete(typelib_TypeDescription ** ppTypeDescr, bool initTables) {
{
typelib_typedescriptionreference_getDescription(
&pTD, reinterpret_cast<typelib_IndirectTypeDescription *>(pTD)->pType );
- assert( pTD );
+ OSL_ASSERT( pTD );
if (! pTD)
return false;
}
- assert( typelib_TypeClass_TYPEDEF != pTD->eTypeClass );
+ OSL_ASSERT( typelib_TypeClass_TYPEDEF != pTD->eTypeClass );
// typedescription found
// set to on demand
pTD->bOnDemand = true;
@@ -496,7 +496,7 @@ bool complete(typelib_TypeDescription ** ppTypeDescr, bool initTables) {
&& !pTD->bComplete && initTables)
{
// mandatory info from callback chain
- assert( reinterpret_cast<typelib_InterfaceTypeDescription *>(pTD)->ppAllMembers );
+ OSL_ASSERT( reinterpret_cast<typelib_InterfaceTypeDescription *>(pTD)->ppAllMembers );
// complete except of tables init
typelib_typedescription_initTables( pTD );
pTD->bComplete = true;
@@ -505,7 +505,7 @@ bool complete(typelib_TypeDescription ** ppTypeDescr, bool initTables) {
// The type description is hold by the reference until
// on demand is activated.
::typelib_typedescription_register( &pTD ); // replaces incomplete one
- assert( pTD == *ppTypeDescr ); // has to merge into existing one
+ OSL_ASSERT( pTD == *ppTypeDescr ); // has to merge into existing one
// insert into the chache
MutexGuard aGuard( rInit.getMutex() );
@@ -520,7 +520,7 @@ bool complete(typelib_TypeDescription ** ppTypeDescr, bool initTables) {
typelib_typedescription_acquire( pTD );
rInit.pCache->push_back( pTD );
- assert(
+ OSL_ASSERT(
pTD->bComplete
|| (pTD->eTypeClass == typelib_TypeClass_INTERFACE
&& !initTables));
@@ -553,7 +553,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
*ppRet = nullptr;
}
- assert( typelib_TypeClass_TYPEDEF != eTypeClass );
+ OSL_ASSERT( typelib_TypeClass_TYPEDEF != eTypeClass );
typelib_TypeDescription * pRet;
switch( eTypeClass )
@@ -711,7 +711,7 @@ void newTypeDescription(
sal_Int32 nMembers, typelib_CompoundMember_Init * pCompoundMembers,
typelib_StructMember_Init * pStructMembers)
{
- assert(
+ OSL_ASSERT(
(pCompoundMembers == nullptr || pStructMembers == nullptr)
&& (pStructMembers == nullptr || eTypeClass == typelib_TypeClass_STRUCT));
if (typelib_TypeClass_TYPEDEF == eTypeClass)
@@ -727,7 +727,7 @@ void newTypeDescription(
{
case typelib_TypeClass_SEQUENCE:
{
- assert( nMembers == 0 );
+ OSL_ASSERT( nMembers == 0 );
typelib_typedescriptionreference_acquire( pType );
reinterpret_cast<typelib_IndirectTypeDescription *>(*ppRet)->pType = pType;
}
@@ -755,7 +755,7 @@ void newTypeDescription(
pTmp->ppMemberNames = new rtl_uString *[ nMembers ];
bool polymorphic = eTypeClass == typelib_TypeClass_STRUCT
&& rtl::OUString::unacquired(&pTypeName).indexOf('<') >= 0;
- assert(!polymorphic || pStructMembers != nullptr);
+ OSL_ASSERT(!polymorphic || pStructMembers != nullptr);
if (polymorphic) {
reinterpret_cast< typelib_StructTypeDescription * >(pTmp)->
pParameterizedTypes = new sal_Bool[nMembers];
@@ -958,11 +958,11 @@ void BaseList::calculate(
e.directBaseMemberOffset = *directBaseMembers;
e.base = desc;
list.push_back(e);
- assert(desc->ppAllMembers != nullptr);
+ OSL_ASSERT(desc->ppAllMembers != nullptr);
members += desc->nMembers;
}
if (directBaseSet.insert(desc->aBase.pTypeName).second) {
- assert(desc->ppAllMembers != nullptr);
+ OSL_ASSERT(desc->ppAllMembers != nullptr);
*directBaseMembers += desc->nMembers;
}
}
@@ -1004,10 +1004,10 @@ extern "C" void SAL_CALL typelib_typedescription_newMIInterface(
&pITD->ppBaseTypes[i]),
false))
{
- assert(false);
+ OSL_ASSERT(false);
return;
}
- assert(pITD->ppBaseTypes[i] != nullptr);
+ OSL_ASSERT(pITD->ppBaseTypes[i] != nullptr);
}
if (nBaseInterfaces > 0) {
pITD->pBaseTypeDescription = pITD->ppBaseTypes[0];
@@ -1036,7 +1036,7 @@ extern "C" void SAL_CALL typelib_typedescription_newMIInterface(
typelib_InterfaceTypeDescription const * pBase = i->base;
typelib_InterfaceTypeDescription const * pDirectBase
= pITD->ppBaseTypes[i->directBaseIndex];
- assert(pBase->ppAllMembers != nullptr);
+ OSL_ASSERT(pBase->ppAllMembers != nullptr);
for (sal_Int32 j = 0; j < pBase->nMembers; ++j) {
typelib_TypeDescriptionReference const * pDirectBaseMember
= pDirectBase->ppAllMembers[i->directBaseMemberOffset + j];
@@ -1085,7 +1085,7 @@ namespace {
typelib_TypeDescriptionReference ** copyExceptions(
sal_Int32 count, rtl_uString ** typeNames)
{
- assert(count >= 0);
+ OSL_ASSERT(count >= 0);
if (count == 0) {
return nullptr;
}
@@ -1170,7 +1170,7 @@ extern "C" void SAL_CALL typelib_typedescription_newInterfaceMethod(
(*ppRet)->ppExceptions = copyExceptions(nExceptions, ppExceptionNames);
(*ppRet)->pInterface = pInterface;
(*ppRet)->pBaseRef = nullptr;
- assert(
+ OSL_ASSERT(
(nAbsolutePosition >= pInterface->nAllMembers - pInterface->nMembers)
&& nAbsolutePosition < pInterface->nAllMembers);
(*ppRet)->nIndex = nAbsolutePosition
@@ -1242,7 +1242,7 @@ extern "C" void SAL_CALL typelib_typedescription_newExtendedInterfaceAttribute(
(*ppRet)->bReadOnly = bReadOnly;
(*ppRet)->pInterface = pInterface;
(*ppRet)->pBaseRef = nullptr;
- assert(
+ OSL_ASSERT(
(nAbsolutePosition >= pInterface->nAllMembers - pInterface->nMembers)
&& nAbsolutePosition < pInterface->nAllMembers);
(*ppRet)->nIndex = nAbsolutePosition
@@ -1283,7 +1283,7 @@ void deleteExceptions(
static inline void typelib_typedescription_destructExtendedMembers(
typelib_TypeDescription * pTD )
{
- assert( typelib_TypeClass_TYPEDEF != pTD->eTypeClass );
+ OSL_ASSERT( typelib_TypeClass_TYPEDEF != pTD->eTypeClass );
switch( pTD->eTypeClass )
{
@@ -1391,7 +1391,7 @@ extern "C" void SAL_CALL typelib_typedescription_release(
SAL_THROW_EXTERN_C()
{
sal_Int32 ref = osl_atomic_decrement( &pTD->nRefCount );
- assert(ref >= 0);
+ OSL_ASSERT(ref >= 0);
if (0 == ref)
{
TypeDescriptor_Init_Impl &rInit = Init::get();
@@ -1468,10 +1468,10 @@ extern "C" void SAL_CALL typelib_typedescription_register(
typelib_TypeDescriptionReference * pTDR = nullptr;
typelib_typedescriptionreference_getByName( &pTDR, (*ppNewDescription)->pTypeName );
- assert( (*ppNewDescription)->pWeakRef || reallyWeak( (*ppNewDescription)->eTypeClass ) );
+ OSL_ASSERT( (*ppNewDescription)->pWeakRef || reallyWeak( (*ppNewDescription)->eTypeClass ) );
if( pTDR )
{
- assert( (*ppNewDescription)->eTypeClass == pTDR->eTypeClass );
+ OSL_ASSERT( (*ppNewDescription)->eTypeClass == pTDR->eTypeClass );
if( pTDR->pType )
{
if (reallyWeak( pTDR->eTypeClass ))
@@ -1494,7 +1494,7 @@ extern "C" void SAL_CALL typelib_typedescription_register(
}
// take new descr
pTDR->pType = *ppNewDescription;
- assert( ! (*ppNewDescription)->pWeakRef );
+ OSL_ASSERT( ! (*ppNewDescription)->pWeakRef );
(*ppNewDescription)->pWeakRef = pTDR;
return;
}
@@ -1572,7 +1572,7 @@ extern "C" void SAL_CALL typelib_typedescription_register(
// description is the weak itself, so register it
(*rInit.pWeakMap)[pTDR->pTypeName->buffer] = pTDR;
- assert( static_cast<void *>(*ppNewDescription) == static_cast<void *>(pTDR) );
+ OSL_ASSERT( static_cast<void *>(*ppNewDescription) == static_cast<void *>(pTDR) );
}
// By default this reference is not really weak. The reference hold the description
@@ -1585,8 +1585,8 @@ extern "C" void SAL_CALL typelib_typedescription_register(
pTDR->pType = *ppNewDescription;
(*ppNewDescription)->pWeakRef = pTDR;
- assert( rtl_ustr_compare( pTDR->pTypeName->buffer, (*ppNewDescription)->pTypeName->buffer ) == 0 );
- assert( pTDR->eTypeClass == (*ppNewDescription)->eTypeClass );
+ OSL_ASSERT( rtl_ustr_compare( pTDR->pTypeName->buffer, (*ppNewDescription)->pTypeName->buffer ) == 0 );
+ OSL_ASSERT( pTDR->eTypeClass == (*ppNewDescription)->eTypeClass );
}
@@ -1624,7 +1624,7 @@ extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize(
nSize = 0;
rMaxIntegralTypeSize = 1;
- assert( typelib_TypeClass_TYPEDEF != pTypeDescription->eTypeClass );
+ OSL_ASSERT( typelib_TypeClass_TYPEDEF != pTypeDescription->eTypeClass );
switch( pTypeDescription->eTypeClass )
{
@@ -2157,7 +2157,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_release(
}
rtl_uString_release( pRef->pTypeName );
- assert( pRef->pType == nullptr );
+ OSL_ASSERT( pRef->pType == nullptr );
#if OSL_DEBUG_LEVEL > 0
osl_atomic_decrement( &rInit.nTypeDescriptionReferenceCount );
#endif
@@ -2210,9 +2210,9 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_getDescription(
}
typelib_typedescription_getByName( ppRet, pRef->pTypeName );
- assert( !*ppRet || rtl_ustr_compare( pRef->pTypeName->buffer, (*ppRet)->pTypeName->buffer ) == 0 );
- assert( !*ppRet || pRef->eTypeClass == (*ppRet)->eTypeClass );
- assert( !*ppRet || pRef == (*ppRet)->pWeakRef );
+ OSL_ASSERT( !*ppRet || rtl_ustr_compare( pRef->pTypeName->buffer, (*ppRet)->pTypeName->buffer ) == 0 );
+ OSL_ASSERT( !*ppRet || pRef->eTypeClass == (*ppRet)->eTypeClass );
+ OSL_ASSERT( !*ppRet || pRef == (*ppRet)->pWeakRef );
pRef->pType = *ppRet;
}
diff --git a/cppu/source/uno/assign.hxx b/cppu/source/uno/assign.hxx
index b3383a23da5d..59257c44b09a 100644
--- a/cppu/source/uno/assign.hxx
+++ b/cppu/source/uno/assign.hxx
@@ -445,7 +445,7 @@ inline bool _assignData(
return (pQueried != nullptr);
}
default:
- assert(false);
+ OSL_ASSERT(false);
return false;
}
}
diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx
index 8e7dfcab2f13..69721566d9c2 100644
--- a/cppu/source/uno/cascade_mapping.cxx
+++ b/cppu/source/uno/cascade_mapping.cxx
@@ -148,7 +148,7 @@ void MediatorMapping::mapInterface(
if (*ppOut != nullptr)
{
uno_ExtEnvironment * env = m_to.get()->pExtEnv;
- assert(env != nullptr);
+ OSL_ASSERT( env != nullptr );
env->releaseInterface( env, *ppOut );
*ppOut = nullptr;
}
diff --git a/cppu/source/uno/constr.hxx b/cppu/source/uno/constr.hxx
index 7e4e034f08a5..8c15a6fb0142 100644
--- a/cppu/source/uno/constr.hxx
+++ b/cppu/source/uno/constr.hxx
@@ -129,7 +129,7 @@ inline void _defaultConstructData(
*static_cast<void **>(pMem) = nullptr; // either cpp or c-uno interface
break;
default:
- assert(false);
+ OSL_ASSERT(false);
break;
}
}
diff --git a/cppu/source/uno/copy.hxx b/cppu/source/uno/copy.hxx
index 3ac9994a94b9..b6ecb3036577 100644
--- a/cppu/source/uno/copy.hxx
+++ b/cppu/source/uno/copy.hxx
@@ -33,7 +33,7 @@ namespace cppu
inline uno_Sequence * allocSeq(
sal_Int32 nElementSize, sal_Int32 nElements )
{
- assert( nElements >= 0 && nElementSize >= 0 );
+ OSL_ASSERT( nElements >= 0 && nElementSize >= 0 );
uno_Sequence * pSeq = nullptr;
sal_uInt32 nSize = calcSeqMemSize( nElementSize, nElements );
if (nSize > 0)
@@ -224,7 +224,7 @@ inline void _copyConstructAnyFromData(
}
break;
default:
- assert(false);
+ OSL_ASSERT(false);
break;
}
}
@@ -361,7 +361,7 @@ inline void _copyConstructAny(
pDestAny->pReserved = nullptr; // either cpp or c-uno interface
break;
default:
- assert(false);
+ OSL_ASSERT(false);
break;
}
}
@@ -462,7 +462,7 @@ inline uno_Sequence * icopyConstructSequence(
pSourceElements[nPos],
pSeqElementType,
acquire, mapping );
- assert( pNew != nullptr );
+ OSL_ASSERT( pNew != nullptr );
// ought never be a memory allocation problem,
// because of reference counted sequence handles
pDestElements[ nPos ] = pNew;
diff --git a/cppu/source/uno/destr.hxx b/cppu/source/uno/destr.hxx
index a8d2f8ea5cba..580620814b93 100644
--- a/cppu/source/uno/destr.hxx
+++ b/cppu/source/uno/destr.hxx
@@ -253,7 +253,7 @@ inline sal_Int32 idestructElements(
return (sal_Int32)(sizeof(void *));
}
default:
- assert(false);
+ OSL_ASSERT(false);
return 0;
}
}
diff --git a/cppu/source/uno/eq.hxx b/cppu/source/uno/eq.hxx
index 3e043fdcc328..008a204a104e 100644
--- a/cppu/source/uno/eq.hxx
+++ b/cppu/source/uno/eq.hxx
@@ -252,7 +252,7 @@ inline bool _equalSequence(
return true;
}
default:
- assert(false);
+ OSL_ASSERT(false);
return false;
}
}
@@ -580,7 +580,7 @@ inline bool _equalData(
return _equalObject( *static_cast<void **>(pDest), *static_cast<void **>(pSource), queryInterface, release );
break;
default:
- assert(false);
+ OSL_ASSERT(false);
break;
}
return false;
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index c267a3148f46..db32cec51d08 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -185,7 +185,7 @@ inline void ObjectEntry::append(
inline InterfaceEntry * ObjectEntry::find(
typelib_InterfaceTypeDescription * pTypeDescr_ )
{
- assert( ! aInterfaces.empty() );
+ OSL_ASSERT( ! aInterfaces.empty() );
if (aInterfaces.empty())
return nullptr;
@@ -346,7 +346,7 @@ static void SAL_CALL s_stub_defenv_revokeInterface(va_list * pParam)
Ptr2ObjectMap::const_iterator const iFind(
that->aPtr2ObjectMap.find( pInterface ) );
- assert( iFind != that->aPtr2ObjectMap.end() );
+ OSL_ASSERT( iFind != that->aPtr2ObjectMap.end() );
ObjectEntry * pOEntry = iFind->second;
if (! --pOEntry->nRef)
{
@@ -381,15 +381,15 @@ static void SAL_CALL s_stub_defenv_revokeInterface(va_list * pParam)
}
else if (pOEntry->mixedObject)
{
- assert( !pOEntry->aInterfaces.empty() &&
+ OSL_ASSERT( !pOEntry->aInterfaces.empty() &&
pOEntry->aInterfaces[ 0 ].fpFreeProxy == nullptr );
sal_Int32 index = pOEntry->find( pInterface, 1 );
- assert( index > 0 );
+ OSL_ASSERT( index > 0 );
if (index > 0)
{
InterfaceEntry & entry = pOEntry->aInterfaces[ index ];
- assert( entry.pInterface == pInterface );
+ OSL_ASSERT( entry.pInterface == pInterface );
if (entry.fpFreeProxy != nullptr)
{
--entry.refCount;
@@ -408,7 +408,7 @@ static void SAL_CALL s_stub_defenv_revokeInterface(va_list * pParam)
// remove from ptr map
std::size_t erased =
that->aPtr2ObjectMap.erase( pInterface );
- assert( erased == 1 );
+ OSL_ASSERT( erased == 1 );
}
guard.clear();
@@ -1007,7 +1007,7 @@ inline void EnvironmentsData::getRegisteredEnvironments(
{
*pppEnvs = static_cast<uno_Environment **>((*memAlloc)(
sizeof (uno_Environment *) * nSize ));
- assert( *pppEnvs );
+ OSL_ASSERT( *pppEnvs );
while (nSize--)
{
(*pppEnvs)[nSize] = aFounds[nSize];
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index 4384233d3e94..e8dcc574e58a 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -381,7 +381,7 @@ static inline bool loadModule(osl::Module & rModule, const OUString & rBridgeNam
static Mapping loadExternalMapping(
const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose )
{
- assert( rFrom.is() && rTo.is() );
+ OSL_ASSERT( rFrom.is() && rTo.is() );
if (rFrom.is() && rTo.is())
{
#ifdef DISABLE_DYNLOADING
@@ -414,7 +414,7 @@ static Mapping loadExternalMapping(
{
Mapping aExt;
(*fpGetMapFunc)( (uno_Mapping **)&aExt, rFrom.get(), rTo.get() );
- assert( aExt.is() );
+ OSL_ASSERT( aExt.is() );
if (aExt.is())
return aExt;
}
@@ -440,7 +440,7 @@ static Mapping loadExternalMapping(
{
Mapping aExt;
(*fpGetMapFunc)( reinterpret_cast<uno_Mapping **>(&aExt), rFrom.get(), rTo.get() );
- assert( aExt.is() );
+ OSL_ASSERT( aExt.is() );
if (aExt.is())
{
aModule.release();
@@ -460,7 +460,7 @@ static Mapping getDirectMapping(
const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose = OUString() )
{
- assert( rFrom.is() && rTo.is() );
+ OSL_ASSERT( rFrom.is() && rTo.is() );
if (rFrom.is() && rTo.is())
{
MappingsData & rData = getMappingsData();
@@ -705,7 +705,7 @@ void SAL_CALL uno_revokeMapping(
ClearableMutexGuard aGuard( rData.aMappingsMutex );
const t_Mapping2Entry::const_iterator iFind( rData.aMapping2Entry.find( pMapping ) );
- assert( iFind != rData.aMapping2Entry.end() );
+ OSL_ASSERT( iFind != rData.aMapping2Entry.end() );
MappingEntry * pEntry = (*iFind).second;
if (! --pEntry->nRef)
{
diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx
index 4274c3eb7574..3fbe338cfc00 100644
--- a/cppu/source/uno/sequence.cxx
+++ b/cppu/source/uno/sequence.cxx
@@ -44,7 +44,7 @@ namespace cppu
static inline uno_Sequence * reallocSeq(
uno_Sequence * pReallocate, std::size_t nElementSize, sal_Int32 nElements )
{
- assert( nElements >= 0 );
+ OSL_ASSERT( nElements >= 0 );
uno_Sequence * pNew = nullptr;
sal_uInt32 nSize = calcSeqMemSize( nElementSize, nElements );
if (nSize > 0)
@@ -302,7 +302,7 @@ static inline bool idefaultConstructElements(
if (pSeq == nullptr)
{
- assert( nAlloc >= 0 ); // must have been an allocation failure
+ OSL_ASSERT( nAlloc >= 0 ); // must have been an allocation failure
return false;
}
*ppSeq = pSeq;
@@ -532,7 +532,7 @@ static inline bool icopyConstructFromElements(
uno_Sequence * pNew = icopyConstructSequence(
static_cast<uno_Sequence **>(pSourceElements)[nPos],
pSeqElementType, acquire, nullptr );
- assert( pNew != nullptr );
+ OSL_ASSERT( pNew != nullptr );
// ought never be a memory allocation problem,
// because of reference counted sequence handles
pDestElements[ nPos ] = pNew;
@@ -625,7 +625,7 @@ static inline bool ireallocSequence(
}
else
{
- assert( pSeq->nRefCount == 1 );
+ OSL_ASSERT( pSeq->nRefCount == 1 );
if (nSize > nElements) // default construct the rest
{
ret = idefaultConstructElements(
@@ -641,7 +641,7 @@ static inline bool ireallocSequence(
// warning: it is assumed that the following will never fail,
// else this leads to a sequence null handle
*ppSequence = reallocSeq( pSeq, nElementSize, nSize );
- assert( *ppSequence != nullptr );
+ OSL_ASSERT( *ppSequence != nullptr );
ret = (*ppSequence != nullptr);
}
}
@@ -695,7 +695,7 @@ sal_Bool SAL_CALL uno_type_sequence_construct(
ret = true;
}
- assert( (*ppSequence != nullptr) == ret );
+ OSL_ASSERT( (*ppSequence != nullptr) == ret );
return ret;
}
@@ -734,7 +734,7 @@ sal_Bool SAL_CALL uno_sequence_construct(
ret = true;
}
- assert( (*ppSequence != nullptr) == ret );
+ OSL_ASSERT( (*ppSequence != nullptr) == ret );
return ret;
}