summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 08:03:04 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 08:03:13 +1000
commit8dd791560b08525eec3853029fc9f4e1c49f74de (patch)
tree5ad6679757218c4e6b940083a483d93d54807371 /cppu
parentba49d9f20a3edb47eb72007c3023427cb4ec8322 (diff)
tdf#43157: convert rest of cppu from OSL_ASSERT to assert
Change-Id: I32684aaf33a798484d68bb8c3689cae542a8d608
Diffstat (limited to 'cppu')
-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/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
12 files changed, 66 insertions, 66 deletions
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
index 8f46ce7a875a..dfafe2b181dc 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)
{
- OSL_ASSERT(ppOut && pTypeDescr);
+ 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);
- OSL_ASSERT(pOId);
+ 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 0b81cea8130d..ca0fffd2f4ab 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);
- OSL_ASSERT(pThis == this);
+ assert(pThis == this);
}
if (m_probeFun)
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index f869e795c077..4c75593558a8 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 )
{
- OSL_ASSERT( typelib_TypeClass_TYPEDEF != eTypeClass );
+ 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;
- OSL_ASSERT( pTDR->nRefCount > pTDR->nStaticRefCount );
+ 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] );
- OSL_ASSERT( pM );
+ 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)
{
- OSL_ASSERT( (typelib_TypeClass_STRUCT == (*ppTypeDescr)->eTypeClass ||
+ 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 );
- OSL_ASSERT( pTD );
+ assert( pTD );
if (! pTD)
return false;
}
- OSL_ASSERT( typelib_TypeClass_TYPEDEF != pTD->eTypeClass );
+ 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
- OSL_ASSERT( reinterpret_cast<typelib_InterfaceTypeDescription *>(pTD)->ppAllMembers );
+ 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
- OSL_ASSERT( pTD == *ppTypeDescr ); // has to merge into existing one
+ 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 );
- OSL_ASSERT(
+ assert(
pTD->bComplete
|| (pTD->eTypeClass == typelib_TypeClass_INTERFACE
&& !initTables));
@@ -553,7 +553,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
*ppRet = nullptr;
}
- OSL_ASSERT( typelib_TypeClass_TYPEDEF != eTypeClass );
+ 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)
{
- OSL_ASSERT(
+ 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:
{
- OSL_ASSERT( nMembers == 0 );
+ 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;
- OSL_ASSERT(!polymorphic || pStructMembers != nullptr);
+ 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);
- OSL_ASSERT(desc->ppAllMembers != nullptr);
+ assert(desc->ppAllMembers != nullptr);
members += desc->nMembers;
}
if (directBaseSet.insert(desc->aBase.pTypeName).second) {
- OSL_ASSERT(desc->ppAllMembers != nullptr);
+ assert(desc->ppAllMembers != nullptr);
*directBaseMembers += desc->nMembers;
}
}
@@ -1004,10 +1004,10 @@ extern "C" void SAL_CALL typelib_typedescription_newMIInterface(
&pITD->ppBaseTypes[i]),
false))
{
- OSL_ASSERT(false);
+ assert(false);
return;
}
- OSL_ASSERT(pITD->ppBaseTypes[i] != nullptr);
+ 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];
- OSL_ASSERT(pBase->ppAllMembers != nullptr);
+ 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)
{
- OSL_ASSERT(count >= 0);
+ 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;
- OSL_ASSERT(
+ 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;
- OSL_ASSERT(
+ 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 )
{
- OSL_ASSERT( typelib_TypeClass_TYPEDEF != pTD->eTypeClass );
+ 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 );
- OSL_ASSERT(ref >= 0);
+ 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 );
- OSL_ASSERT( (*ppNewDescription)->pWeakRef || reallyWeak( (*ppNewDescription)->eTypeClass ) );
+ assert( (*ppNewDescription)->pWeakRef || reallyWeak( (*ppNewDescription)->eTypeClass ) );
if( pTDR )
{
- OSL_ASSERT( (*ppNewDescription)->eTypeClass == pTDR->eTypeClass );
+ 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;
- OSL_ASSERT( ! (*ppNewDescription)->pWeakRef );
+ 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;
- OSL_ASSERT( static_cast<void *>(*ppNewDescription) == static_cast<void *>(pTDR) );
+ 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;
- OSL_ASSERT( rtl_ustr_compare( pTDR->pTypeName->buffer, (*ppNewDescription)->pTypeName->buffer ) == 0 );
- OSL_ASSERT( pTDR->eTypeClass == (*ppNewDescription)->eTypeClass );
+ assert( rtl_ustr_compare( pTDR->pTypeName->buffer, (*ppNewDescription)->pTypeName->buffer ) == 0 );
+ assert( pTDR->eTypeClass == (*ppNewDescription)->eTypeClass );
}
@@ -1624,7 +1624,7 @@ extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize(
nSize = 0;
rMaxIntegralTypeSize = 1;
- OSL_ASSERT( typelib_TypeClass_TYPEDEF != pTypeDescription->eTypeClass );
+ 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 );
- OSL_ASSERT( pRef->pType == nullptr );
+ 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 );
- 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 );
+ assert( !*ppRet || rtl_ustr_compare( pRef->pTypeName->buffer, (*ppRet)->pTypeName->buffer ) == 0 );
+ assert( !*ppRet || pRef->eTypeClass == (*ppRet)->eTypeClass );
+ assert( !*ppRet || pRef == (*ppRet)->pWeakRef );
pRef->pType = *ppRet;
}
diff --git a/cppu/source/uno/assign.hxx b/cppu/source/uno/assign.hxx
index 59257c44b09a..b3383a23da5d 100644
--- a/cppu/source/uno/assign.hxx
+++ b/cppu/source/uno/assign.hxx
@@ -445,7 +445,7 @@ inline bool _assignData(
return (pQueried != nullptr);
}
default:
- OSL_ASSERT(false);
+ assert(false);
return false;
}
}
diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx
index 69721566d9c2..8e7dfcab2f13 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;
- OSL_ASSERT( env != nullptr );
+ assert(env != nullptr);
env->releaseInterface( env, *ppOut );
*ppOut = nullptr;
}
diff --git a/cppu/source/uno/constr.hxx b/cppu/source/uno/constr.hxx
index 8c15a6fb0142..7e4e034f08a5 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:
- OSL_ASSERT(false);
+ assert(false);
break;
}
}
diff --git a/cppu/source/uno/copy.hxx b/cppu/source/uno/copy.hxx
index b6ecb3036577..3ac9994a94b9 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 )
{
- OSL_ASSERT( nElements >= 0 && nElementSize >= 0 );
+ 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:
- OSL_ASSERT(false);
+ assert(false);
break;
}
}
@@ -361,7 +361,7 @@ inline void _copyConstructAny(
pDestAny->pReserved = nullptr; // either cpp or c-uno interface
break;
default:
- OSL_ASSERT(false);
+ assert(false);
break;
}
}
@@ -462,7 +462,7 @@ inline uno_Sequence * icopyConstructSequence(
pSourceElements[nPos],
pSeqElementType,
acquire, mapping );
- OSL_ASSERT( pNew != nullptr );
+ 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 580620814b93..a8d2f8ea5cba 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:
- OSL_ASSERT(false);
+ assert(false);
return 0;
}
}
diff --git a/cppu/source/uno/eq.hxx b/cppu/source/uno/eq.hxx
index 008a204a104e..3e043fdcc328 100644
--- a/cppu/source/uno/eq.hxx
+++ b/cppu/source/uno/eq.hxx
@@ -252,7 +252,7 @@ inline bool _equalSequence(
return true;
}
default:
- OSL_ASSERT(false);
+ 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:
- OSL_ASSERT(false);
+ assert(false);
break;
}
return false;
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index db32cec51d08..c267a3148f46 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_ )
{
- OSL_ASSERT( ! aInterfaces.empty() );
+ 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 ) );
- OSL_ASSERT( iFind != that->aPtr2ObjectMap.end() );
+ 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)
{
- OSL_ASSERT( !pOEntry->aInterfaces.empty() &&
+ assert( !pOEntry->aInterfaces.empty() &&
pOEntry->aInterfaces[ 0 ].fpFreeProxy == nullptr );
sal_Int32 index = pOEntry->find( pInterface, 1 );
- OSL_ASSERT( index > 0 );
+ assert( index > 0 );
if (index > 0)
{
InterfaceEntry & entry = pOEntry->aInterfaces[ index ];
- OSL_ASSERT( entry.pInterface == pInterface );
+ 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 );
- OSL_ASSERT( erased == 1 );
+ assert( erased == 1 );
}
guard.clear();
@@ -1007,7 +1007,7 @@ inline void EnvironmentsData::getRegisteredEnvironments(
{
*pppEnvs = static_cast<uno_Environment **>((*memAlloc)(
sizeof (uno_Environment *) * nSize ));
- OSL_ASSERT( *pppEnvs );
+ assert( *pppEnvs );
while (nSize--)
{
(*pppEnvs)[nSize] = aFounds[nSize];
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index e8dcc574e58a..4384233d3e94 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 )
{
- OSL_ASSERT( rFrom.is() && rTo.is() );
+ 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() );
- OSL_ASSERT( aExt.is() );
+ 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() );
- OSL_ASSERT( aExt.is() );
+ 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() )
{
- OSL_ASSERT( rFrom.is() && rTo.is() );
+ 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 ) );
- OSL_ASSERT( iFind != rData.aMapping2Entry.end() );
+ 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 3fbe338cfc00..4274c3eb7574 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 )
{
- OSL_ASSERT( nElements >= 0 );
+ 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)
{
- OSL_ASSERT( nAlloc >= 0 ); // must have been an allocation failure
+ 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 );
- OSL_ASSERT( pNew != nullptr );
+ 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
{
- OSL_ASSERT( pSeq->nRefCount == 1 );
+ 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 );
- OSL_ASSERT( *ppSequence != nullptr );
+ assert( *ppSequence != nullptr );
ret = (*ppSequence != nullptr);
}
}
@@ -695,7 +695,7 @@ sal_Bool SAL_CALL uno_type_sequence_construct(
ret = true;
}
- OSL_ASSERT( (*ppSequence != nullptr) == ret );
+ assert( (*ppSequence != nullptr) == ret );
return ret;
}
@@ -734,7 +734,7 @@ sal_Bool SAL_CALL uno_sequence_construct(
ret = true;
}
- OSL_ASSERT( (*ppSequence != nullptr) == ret );
+ assert( (*ppSequence != nullptr) == ret );
return ret;
}