[Libreoffice-commits] core.git: bridges/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Sep 24 10:41:06 UTC 2018
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 <sbergman at redhat.com>
AuthorDate: Mon Sep 24 11:01:54 2018 +0200
Commit: Stephan Bergmann <sbergman at 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 <sbergman at 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<
More information about the Libreoffice-commits
mailing list