bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-)
New commits: commit c3d8f8742e8bc713316a7e9b2351b94b9a297b59 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Sep 24 11:01:54 2018 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon Sep 24 12:40:44 2018 +0200 Simplify assertion code ...avoiding conditional blocks and variables (that need careful #if'ing to avoid them being either undefined or unused depending on NDEBUG and OSL_DEBUG_LEVEL combintaion) Change-Id: Ica9fe3857694f5c0a6e9079dfff05f2e0554b781 Reviewed-on: https://gerrit.libreoffice.org/60926 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx index f0b2f815524c..68f868238e92 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx @@ -309,19 +309,15 @@ void unoInterfaceProxyDispatch( // is my surrogate bridges::cpp_uno::shared::UnoInterfaceProxy * pThis = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI); -#if OSL_DEBUG_LEVEL > 0 - typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr; -#endif switch (pMemberDescr->eTypeClass) { case typelib_TypeClass_INTERFACE_ATTRIBUTE: { -#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG - // determine vtable call index - sal_Int32 nMemberPos = reinterpret_cast<typelib_InterfaceMemberTypeDescription const *>(pMemberDescr)->nPosition; - assert(nMemberPos < pTypeDescr->nAllMembers); -#endif + assert( + (reinterpret_cast<typelib_InterfaceMemberTypeDescription const *>(pMemberDescr) + ->nPosition) + < pThis->pTypeDescr->nAllMembers); VtableSlot aVtableSlot( getVtableSlot( reinterpret_cast< @@ -366,11 +362,10 @@ void unoInterfaceProxyDispatch( } case typelib_TypeClass_INTERFACE_METHOD: { -#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG - // determine vtable call index - sal_Int32 nMemberPos = reinterpret_cast<typelib_InterfaceMemberTypeDescription const *>(pMemberDescr)->nPosition; - assert(nMemberPos < pTypeDescr->nAllMembers); -#endif + assert( + (reinterpret_cast<typelib_InterfaceMemberTypeDescription const *>(pMemberDescr) + ->nPosition) + < pThis->pTypeDescr->nAllMembers); VtableSlot aVtableSlot( getVtableSlot( reinterpret_cast< _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits