diff options
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx index 70452c7234e3..c3a3650bf667 100644 --- a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx @@ -20,7 +20,6 @@ #include <com/sun/star/uno/genfunc.hxx> #include "com/sun/star/uno/RuntimeException.hpp" -#include <osl/diagnose.h> #include <uno/data.h> #include <typelib/typedescription.hxx> @@ -77,7 +76,7 @@ void cpp2uno_call( 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; @@ -218,7 +217,7 @@ extern "C" void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** pCallStack, void * pReturnValue ) { - OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" ); + static_assert(sizeof(sal_Int32)==sizeof(void *), "### unexpected!"); // pCallStack: ret adr, [ret *], this, params void * pThis; @@ -254,7 +253,7 @@ extern "C" void cpp_vtable_call( // 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] ); @@ -417,7 +416,7 @@ unsigned char * codeSnippet( break; } unsigned char * p = code; - OSL_ASSERT(sizeof (sal_Int32) == 4); + assert(sizeof (sal_Int32) == 4); // mov function_index, %eax: *p++ = 0xB8; *reinterpret_cast< sal_Int32 * >(p) = functionIndex; @@ -431,7 +430,7 @@ unsigned char * codeSnippet( *reinterpret_cast< sal_Int32 * >(p) = ((unsigned char *) exec) - p - sizeof (sal_Int32) - writetoexecdiff; p += sizeof (sal_Int32); - OSL_ASSERT(p - code <= codeSnippetSize); + assert(p - code <= codeSnippetSize); return code + codeSnippetSize; } @@ -471,7 +470,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: @@ -501,7 +500,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( break; default: - OSL_ASSERT(false); + assert(false); break; } TYPELIB_DANGER_RELEASE(member); |