diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-11-21 17:30:53 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-11-21 17:32:26 +0100 |
commit | 1276076ac8fcc84df64050f8aa194fa75386a0ea (patch) | |
tree | 258d77877c052464ff113f56355bbcc5d16e80a5 /bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx | |
parent | 329742e6c9da7cd7848d92a6846e3d1249d8d9b4 (diff) |
ibridges: convert all legacy osl/diagnose.h assertions in source/cppu_uno
Change-Id: I4e78fac76b6bb4923e3b680d910afe5bb9640c33
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx index 24be4a0a2315..0ac80dc26925 100644 --- a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx @@ -61,10 +61,10 @@ void callVirtualMethod( void * pAdjustedThisPtr, // parameter list is mixed list of * and values // reference parameters are pointers - OSL_ENSURE( pStackLongs && pAdjustedThisPtr, "### null ptr!" ); - OSL_ENSURE( (sizeof(void *) == 4) && + assert(pStackLongs && pAdjustedThisPtr); + static_assert( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!" ); - OSL_ENSURE( nStackLongs && pStackLongs, "### no stack in callVirtualMethod !" ); + assert(nStackLongs && pStackLongs && "### no stack in callVirtualMethod !"); // never called if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something @@ -285,7 +285,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 @@ -312,7 +312,7 @@ static void cpp_call( pCppStack += sizeof( void* ); // stack space - OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" ); + static_assert(sizeof(void *) == sizeof(sal_Int32), "### unexpected size!"); // args void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams ); // indices of values this have to be converted (interface conversion cpp<=>uno) @@ -336,7 +336,7 @@ static void cpp_call( case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: case typelib_TypeClass_DOUBLE: - OSL_ASSERT( sizeof (double) == sizeof (sal_Int64) ); + static_assert(sizeof (double) == sizeof (sal_Int64)); *reinterpret_cast< sal_Int32 * >(pCppStack) = *reinterpret_cast< sal_Int32 const * >(pUnoArgs[ nPos ]); pCppStack += sizeof (sal_Int32); @@ -390,7 +390,7 @@ static void cpp_call( try { int nStackLongs = (pCppStack - pCppStackStart)/sizeof(sal_Int32); - OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic" ); + assert( !( (pCppStack - pCppStackStart ) & 3) && "UNALIGNED STACK !!! (Please DO panic" ); if( nStackLongs & 1 ) // stack has to be 8 byte aligned |