summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_s390x
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_s390x')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx10
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx4
3 files changed, 12 insertions, 16 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
index 323b9a8ba7e2..b21d4f9a25b7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
@@ -82,7 +82,7 @@ static typelib_TypeClass cpp2uno_call(
ng++;
// stack space
- OSL_ENSURE( sizeof(void *) == sizeof(sal_Int64), "### unexpected size!" );
+ static_assert(sizeof(void *) == sizeof(sal_Int64), "### unexpected size!");
// parameters
void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
void ** pCppArgs = pUnoArgs + nParams;
@@ -316,7 +316,7 @@ static typelib_TypeClass cpp_mediate(
void ** gpreg, void ** fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
- OSL_ENSURE( sizeof(sal_Int64)==sizeof(void *), "### unexpected!" );
+ static_assert(sizeof(sal_Int64)==sizeof(void *), "### unexpected!");
sal_Int32 nVtableOffset = (nOffsetAndIndex >> 32);
sal_Int32 nFunctionIndex = (nOffsetAndIndex & 0xFFFFFFFF);
@@ -381,7 +381,7 @@ static typelib_TypeClass cpp_mediate(
// determine called method
sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
- OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
+ assert(nMemberPos < pTypeDescr->nAllMembers);
TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
@@ -604,7 +604,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
for (sal_Int32 i = 0; i < type->nMembers; ++i) {
typelib_TypeDescription * member = 0;
TYPELIB_DANGER_GET(&member, type->ppMembers[i]);
- OSL_ASSERT(member != 0);
+ assert(member != 0);
switch (member->eTypeClass) {
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
// Getter:
@@ -637,7 +637,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
break;
default:
- OSL_ASSERT(false);
+ assert(false);
break;
}
TYPELIB_DANGER_RELEASE(member);
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
index b745a703b92f..92faed480720 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
@@ -26,7 +26,6 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
-#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <com/sun/star/uno/genfunc.hxx>
@@ -58,7 +57,7 @@ static OUString toUNOname( char const * p )
// example: N3com3sun4star4lang24IllegalArgumentExceptionE
OUStringBuffer buf( 64 );
- OSL_ASSERT( 'N' == *p );
+ assert( 'N' == *p );
++p; // skip N
while ('E' != *p)
@@ -145,7 +144,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
{
pair< t_rtti_map::iterator, bool > insertion(
m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- OSL_ENSURE( insertion.second, "### inserting new rtti failed?!" );
+ assert( insertion.second && "### inserting new rtti failed?!");
}
else
{
@@ -176,7 +175,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
pair< t_rtti_map::iterator, bool > insertion(
m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" );
+ assert(insertion.second && "### inserting new generated rtti failed?!");
}
else // taking already generated rtti
{
@@ -199,7 +198,7 @@ static void deleteException( void * pExc )
typelib_TypeDescription * pTD = 0;
OUString unoName( toUNOname( header->exceptionType->name() ) );
::typelib_typedescription_getByName( &pTD, unoName.pData );
- OSL_ENSURE( pTD, "### unknown exception type! leaving out destruction => leaking!!!" );
+ assert(pTD && "### unknown exception type! leaving out destruction => leaking!!!");
if (pTD)
{
::uno_destructData( pExc, pTD, cpp_release );
@@ -216,7 +215,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// construct cpp exception object
typelib_TypeDescription * pTypeDescr = 0;
TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
- OSL_ASSERT( pTypeDescr );
+ assert(pTypeDescr);
if (! pTypeDescr)
terminate();
@@ -242,7 +241,6 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
}
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
TYPELIB_DANGER_RELEASE( pTypeDescr );
- OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
if (! rtti)
terminate();
}
@@ -252,14 +250,12 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * pCpp2Uno )
{
- OSL_ENSURE( header, "### no exception header!!!" );
if (! header)
terminate();
typelib_TypeDescription * pExcTypeDescr = 0;
OUString unoName( toUNOname( header->exceptionType->name() ) );
::typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
- OSL_ENSURE( pExcTypeDescr, "### can not get type description for exception!!!" );
if (! pExcTypeDescr)
terminate();
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx
index f805f2850d24..45429d0e3b09 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx
@@ -214,7 +214,7 @@ static void cpp_call(
// return
typelib_TypeDescription * pReturnTypeDescr = 0;
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
- OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
+ assert(pReturnTypeDescr);
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
@@ -239,7 +239,7 @@ static void cpp_call(
INSERT_INT64( &pAdjustedThisPtr, nGPR, pGPR, pStack );
// stack space
- OSL_ENSURE( sizeof(void *) == sizeof(sal_Int64), "### unexpected size!" );
+ static_assert(sizeof(void *) == sizeof(sal_Int64), "### unexpected size!");
// args
void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
// indices of values this have to be converted (interface conversion cpp<=>uno)