diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-31 13:12:58 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-31 13:12:58 +0200 |
commit | c57ffac6954095ef729daf92b9965ced2da2ddc4 (patch) | |
tree | 57377e50a6c10b059cb5e29f036f6c991e3bca5c /cppu | |
parent | 6d393f82b1870368be00a0054feb1685d0a1263d (diff) |
Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I22ee2cbacad8b19bb55db234e816d401edcf4a35
Diffstat (limited to 'cppu')
-rw-r--r-- | cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx | 2 | ||||
-rw-r--r-- | cppu/source/threadpool/current.cxx | 4 | ||||
-rw-r--r-- | cppu/source/uno/EnvStack.cxx | 10 | ||||
-rw-r--r-- | cppu/source/uno/data.cxx | 2 | ||||
-rw-r--r-- | cppu/source/uno/lbenv.cxx | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx index 2b90a37027e1..f73a3228ed5b 100644 --- a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx +++ b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx @@ -172,7 +172,7 @@ extern "C" { static void SAL_CALL s_Proxy_dispatch( extern "C" void SAL_CALL Proxy_free(SAL_UNUSED_PARAMETER uno_ExtEnvironment * /*pEnv*/, void * pProxy) SAL_THROW_EXTERN_C() { - Proxy * pThis = static_cast<Proxy * >(reinterpret_cast<uno_Interface *>(pProxy)); + Proxy * pThis = static_cast<Proxy * >(static_cast<uno_Interface *>(pProxy)); delete pThis; } diff --git a/cppu/source/threadpool/current.cxx b/cppu/source/threadpool/current.cxx index 63992dd87d74..610d4b35e755 100644 --- a/cppu/source/threadpool/current.cxx +++ b/cppu/source/threadpool/current.cxx @@ -146,7 +146,7 @@ extern "C" void SAL_CALL delete_IdContainer( void * p ) { if (p) { - IdContainer * pId = reinterpret_cast< IdContainer * >( p ); + IdContainer * pId = static_cast< IdContainer * >( p ); if (pId->pCurrentContext) { (*pId->pCurrentContextEnv->releaseInterface)( @@ -168,7 +168,7 @@ IdContainer * getIdContainer() static ThreadKey s_key( delete_IdContainer ); oslThreadKey aKey = s_key.getThreadKey(); - IdContainer * pId = reinterpret_cast< IdContainer * >( ::osl_getThreadKeyData( aKey ) ); + IdContainer * pId = static_cast< IdContainer * >( ::osl_getThreadKeyData( aKey ) ); if (! pId) { pId = new IdContainer(); diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx index abc39a5d05f9..1bb726685348 100644 --- a/cppu/source/uno/EnvStack.cxx +++ b/cppu/source/uno/EnvStack.cxx @@ -228,7 +228,7 @@ extern "C" { static void s_pull(va_list * pParam) static void s_callInto_v(uno_Environment * pEnv, uno_EnvCallee * pCallee, va_list * pParam) { - cppu::Enterable * pEnterable = reinterpret_cast<cppu::Enterable *>(pEnv->pReserved); + cppu::Enterable * pEnterable = static_cast<cppu::Enterable *>(pEnv->pReserved); if (pEnterable) pEnterable->callInto(s_pull, pCallee, pParam); @@ -247,7 +247,7 @@ static void s_callInto(uno_Environment * pEnv, uno_EnvCallee * pCallee, ...) static void s_callOut_v(uno_Environment * pEnv, uno_EnvCallee * pCallee, va_list * pParam) { - cppu::Enterable * pEnterable = reinterpret_cast<cppu::Enterable *>(pEnv->pReserved); + cppu::Enterable * pEnterable = static_cast<cppu::Enterable *>(pEnv->pReserved); if (pEnterable) pEnterable->callOut_v(pCallee, pParam); @@ -336,7 +336,7 @@ extern "C" void SAL_CALL uno_Environment_enter(uno_Environment * pTargetEnv) switch(res) { case -1: - pEnterable = reinterpret_cast<cppu::Enterable *>(pCurrEnv->pReserved); + pEnterable = static_cast<cppu::Enterable *>(pCurrEnv->pReserved); if (pEnterable) pEnterable->leave(); pCurrEnv->release(pCurrEnv); @@ -344,7 +344,7 @@ extern "C" void SAL_CALL uno_Environment_enter(uno_Environment * pTargetEnv) case 1: pNextEnv->acquire(pNextEnv); - pEnterable = reinterpret_cast<cppu::Enterable *>(pNextEnv->pReserved); + pEnterable = static_cast<cppu::Enterable *>(pNextEnv->pReserved); if (pEnterable) pEnterable->enter(); break; @@ -363,7 +363,7 @@ int SAL_CALL uno_Environment_isValid(uno_Environment * pEnv, rtl_uString ** pRea rtl::OUString typeName(cppu::EnvDcp::getTypeName(pEnv->pTypeName)); if (typeName == UNO_LB_UNO) { - cppu::Enterable * pEnterable = reinterpret_cast<cppu::Enterable *>(pEnv->pReserved); + cppu::Enterable * pEnterable = static_cast<cppu::Enterable *>(pEnv->pReserved); if (pEnterable) result = pEnterable->isValid(reinterpret_cast<rtl::OUString *>(pReason)); } diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx index 896b6094a0f1..2f027f0ab49b 100644 --- a/cppu/source/uno/data.cxx +++ b/cppu/source/uno/data.cxx @@ -95,7 +95,7 @@ void * binuno_queryInterface( void * pUnoI, typelib_TypeDescriptionReference * p "exception occurred querying for interface " << OUString(pDestType->pTypeName) << ": [" << OUString(pExc->pType->pTypeName) << "] " - << *reinterpret_cast<OUString const *>(pExc->pData)); + << *static_cast<OUString const *>(pExc->pData)); // Message is very first member uno_any_destruct( pExc, 0 ); } diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index 19578469fbeb..cc7a02e3364a 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -882,7 +882,7 @@ static void SAL_CALL unoenv_computeObjectIdentifier( static void SAL_CALL unoenv_acquireInterface( SAL_UNUSED_PARAMETER uno_ExtEnvironment *, void * pUnoI_ ) { - uno_Interface * pUnoI = reinterpret_cast< uno_Interface * >(pUnoI_); + uno_Interface * pUnoI = static_cast< uno_Interface * >(pUnoI_); (*pUnoI->acquire)( pUnoI ); } @@ -890,7 +890,7 @@ static void SAL_CALL unoenv_acquireInterface( static void SAL_CALL unoenv_releaseInterface( SAL_UNUSED_PARAMETER uno_ExtEnvironment *, void * pUnoI_ ) { - uno_Interface * pUnoI = reinterpret_cast< uno_Interface * >(pUnoI_); + uno_Interface * pUnoI = static_cast< uno_Interface * >(pUnoI_); (*pUnoI->release)( pUnoI ); } } |