diff options
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx index 2b7820c65b4f..53d71f93a1fc 100644 --- a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx @@ -68,7 +68,7 @@ static typelib_TypeClass 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; @@ -96,7 +96,7 @@ static typelib_TypeClass cpp2uno_call( { if ((reinterpret_cast< long >(pCppStack) & 7) != 0) { - OSL_ASSERT( sizeof (double) == sizeof (sal_Int64) ); + static_assert(sizeof (double) == sizeof (sal_Int64)); void * pDest = alloca( sizeof (sal_Int64) ); *reinterpret_cast< sal_Int32 * >(pDest) = *reinterpret_cast< sal_Int32 const * >(pCppStack); @@ -223,7 +223,7 @@ static typelib_TypeClass cpp_mediate( 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: this, params // eventual [ret*] lies at pCallStack -1 @@ -257,7 +257,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] ); @@ -442,7 +442,7 @@ unsigned char * codeSnippet( index |= 0x80000000; } unsigned int * p = reinterpret_cast< unsigned int * >(code); - OSL_ASSERT(sizeof (unsigned int) == 4); + static_assert(sizeof (unsigned int) == 4); // st %o0, [%sp+68]: *p++ = 0xD023A044; // st %o1, [%sp+72]: @@ -471,8 +471,7 @@ unsigned char * codeSnippet( *p++ = 0x81C2C000; // mov %sp, %o1: *p++ = 0x9210000E; - OSL_ASSERT( - reinterpret_cast< unsigned char * >(p) - code <= codeSnippetSize); + assert(reinterpret_cast< unsigned char * >(p) - code <= codeSnippetSize); return code + codeSnippetSize; } @@ -513,7 +512,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: @@ -545,7 +544,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( break; default: - OSL_ASSERT(false); + assert(false); break; } TYPELIB_DANGER_RELEASE(member); |