[Libreoffice-commits] core.git: cppu/source

Stephan Bergmann sbergman at redhat.com
Wed Jul 8 11:57:00 PDT 2015


 cppu/source/uno/prim.hxx |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 81275d4725236b0c7fe9e724299dd67eeb203c99
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jul 8 20:56:19 2015 +0200

    Avoid loplugin:redundantcast in non-debug build
    
    Change-Id: Ib5f57ba5154c56b89ab550aef5a87ee27539ddd9

diff --git a/cppu/source/uno/prim.hxx b/cppu/source/uno/prim.hxx
index d168fe8..3fcdb13 100644
--- a/cppu/source/uno/prim.hxx
+++ b/cppu/source/uno/prim.hxx
@@ -130,17 +130,14 @@ inline typelib_TypeDescriptionReference * _getVoidType()
     return g_pVoidType;
 }
 
-
+inline void CONSTRUCT_EMPTY_ANY(uno_Any * pAny) {
+    pAny->pType = _getVoidType();
 #if OSL_DEBUG_LEVEL > 0
-#define CONSTRUCT_EMPTY_ANY( pAny ) \
-(pAny)->pType = _getVoidType(); \
-(pAny)->pData = reinterpret_cast<void *>(0xdeadbeef);
+    pAny->pData = reinterpret_cast<void *>(0xdeadbeef);
 #else
-#define CONSTRUCT_EMPTY_ANY( pAny ) \
-(pAny)->pType = _getVoidType(); \
-(pAny)->pData = (pAny);
+    pAny->pData = pAny;
 #endif
-
+}
 
 #define TYPE_ACQUIRE( pType ) \
     osl_atomic_increment( &(pType)->nRefCount );


More information about the Libreoffice-commits mailing list