diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-31 13:13:09 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-31 13:13:09 +0200 |
commit | caaf1436d7720ae1b367e645fba70165196744e7 (patch) | |
tree | a0295b66ebbdd9cb79baea60cdbc8612c6830e6a /cppuhelper | |
parent | Reduce to static_cast any reinterpret_cast from void pointers (diff) | |
download | core-caaf1436d7720ae1b367e645fba70165196744e7.tar.gz core-caaf1436d7720ae1b367e645fba70165196744e7.zip |
Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I0392b2fc9e48aab4a20849d8203cae96b1ef2d2c
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/exc_thrower.cxx | 8 | ||||
-rw-r--r-- | cppuhelper/source/implementationentry.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/macro_expander.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/tdmgr.cxx | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx index f5bc1d5aa9d5..484a3eddc832 100644 --- a/cppuhelper/source/exc_thrower.cxx +++ b/cppuhelper/source/exc_thrower.cxx @@ -86,7 +86,7 @@ static void SAL_CALL ExceptionThrower_dispatch( case 0: // queryInterace() { Type const & rType_demanded = - *reinterpret_cast< Type const * >( pArgs[ 0 ] ); + *static_cast< Type const * >( pArgs[ 0 ] ); if (rType_demanded.equals( ::getCppuType( reinterpret_cast< Reference< XInterface > const * >(0) ) ) || @@ -95,13 +95,13 @@ static void SAL_CALL ExceptionThrower_dispatch( typelib_TypeDescription * pTD = 0; TYPELIB_DANGER_GET( &pTD, rType_demanded.getTypeLibType() ); uno_any_construct( - reinterpret_cast< uno_Any * >( pReturn ), &pUnoI, pTD, 0 ); + static_cast< uno_Any * >( pReturn ), &pUnoI, pTD, 0 ); TYPELIB_DANGER_RELEASE( pTD ); } else { uno_any_construct( - reinterpret_cast< uno_Any * >( pReturn ), 0, 0, 0 ); + static_cast< uno_Any * >( pReturn ), 0, 0, 0 ); } *ppException = 0; break; @@ -112,7 +112,7 @@ static void SAL_CALL ExceptionThrower_dispatch( break; case 3: // throwException() { - uno_Any * pAny = reinterpret_cast< uno_Any * >( pArgs[ 0 ] ); + uno_Any * pAny = static_cast< uno_Any * >( pArgs[ 0 ] ); OSL_ASSERT( pAny->pType->eTypeClass == typelib_TypeClass_EXCEPTION ); uno_type_any_construct( *ppException, pAny->pData, pAny->pType, 0 ); break; diff --git a/cppuhelper/source/implementationentry.cxx b/cppuhelper/source/implementationentry.cxx index d810e5e58c27..44fa3a3bc46f 100644 --- a/cppuhelper/source/implementationentry.cxx +++ b/cppuhelper/source/implementationentry.cxx @@ -42,7 +42,7 @@ sal_Bool component_writeInfoHelper( { OUString sKey = "/" + entries[i].getImplementationName() + "/UNO/SERVICES"; Reference< XRegistryKey > xNewKey( - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( sKey ) ); + static_cast< XRegistryKey * >( pRegistryKey )->createKey( sKey ) ); Sequence< OUString > seq = entries[i].getSupportedServiceNames(); const OUString *pArray = seq.getConstArray(); diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx index dc610a4ddc88..521c16a24989 100644 --- a/cppuhelper/source/macro_expander.cxx +++ b/cppuhelper/source/macro_expander.cxx @@ -202,7 +202,7 @@ Reference< lang::XSingleComponentFactory > create_bootstrap_macro_expander_facto uno::Mapping target2curr(target_env, curr_env); return Reference<lang::XSingleComponentFactory>( - reinterpret_cast<lang::XSingleComponentFactory *>( + static_cast<lang::XSingleComponentFactory *>( target2curr.mapInterface(free.get(), ::getCppuType(&free))), SAL_NO_ACQUIRE); } diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx index 7e02154c0d97..74dba82c9de9 100644 --- a/cppuhelper/source/tdmgr.cxx +++ b/cppuhelper/source/tdmgr.cxx @@ -579,7 +579,7 @@ static void SAL_CALL typelib_callback( if (pContext && pTypeName) { Reference< container::XHierarchicalNameAccess > access( - reinterpret_cast< container::XHierarchicalNameAccess * >( + static_cast< container::XHierarchicalNameAccess * >( pContext)); try { @@ -649,7 +649,7 @@ sal_Bool SAL_CALL installTypeDescriptionManager( Reference<container::XHierarchicalNameAccess> xTDMgr( - reinterpret_cast<container::XHierarchicalNameAccess *>( + static_cast<container::XHierarchicalNameAccess *>( curr2target.mapInterface(xTDMgr_c.get(), ::getCppuType(&xTDMgr_c))), SAL_NO_ACQUIRE); |