summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
index 0d6a754d9187..8bbbe03d0570 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
@@ -22,7 +22,6 @@
#include <rtl/alloc.h>
#include <osl/mutex.hxx>
-#include <osl/diagnose.h>
#include <com/sun/star/uno/genfunc.hxx>
#include "com/sun/star/uno/RuntimeException.hpp"
@@ -92,8 +91,8 @@ namespace
pCppStack += sizeof( void* );
// stack space
- OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32),
- "### unexpected size!" );
+ static_assert(sizeof(void *) == sizeof(sal_Int32),
+ "### unexpected size!");
// parameters
void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
void ** pCppArgs = pUnoArgs + nParams;
@@ -289,7 +288,7 @@ namespace
void ** pCallStack,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
- OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
+ static_assert(sizeof(sal_Int32)==sizeof(void *), "### unexpected!");
// pCallStack: [ret *], this, params
// _this_ ptr is patched cppu_XInterfaceProxy object
@@ -326,12 +325,10 @@ namespace
}
// determine called method
- OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex,
- "### illegal vtable index!" );
+ assert(nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex);
sal_Int32 nMemberPos =
pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
- OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers,
- "### illegal member index!" );
+ assert(nMemberPos < pTypeDescr->nAllMembers);
TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
@@ -530,7 +527,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
{
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:
@@ -566,7 +563,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
break;
}
default:
- OSL_ASSERT(false);
+ assert(false);
break;
}
TYPELIB_DANGER_RELEASE(member);