summaryrefslogtreecommitdiff
path: root/cppu/source/uno
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/source/uno
parentba49d9f20a3edb47eb72007c3023427cb4ec8322 (diff)
tdf#43157: convert rest of cppu from OSL_ASSERT to assert
Change-Id: I32684aaf33a798484d68bb8c3689cae542a8d608
Diffstat (limited to 'cppu/source/uno')
-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
9 files changed, 29 insertions, 29 deletions
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;
}