summaryrefslogtreecommitdiff
path: root/cppu/source/threadpool
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-17 18:18:10 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-20 09:06:46 +0100
commit9193a15fc55b24e9f463838fd2981ddb84dca227 (patch)
tree55f1a5b401e65bcc7cd52c87def321f15a3b1f72 /cppu/source/threadpool
parent141b01ac65d5922aacdf6010043eadc7c28304a5 (diff)
Some more loplugin:cstylecast: cppu
Change-Id: Iec1251648031afa9eddd7445135fb08dc74821bd
Diffstat (limited to 'cppu/source/threadpool')
-rw-r--r--cppu/source/threadpool/current.cxx16
-rw-r--r--cppu/source/threadpool/threadident.cxx2
-rw-r--r--cppu/source/threadpool/threadpool.hxx2
3 files changed, 10 insertions, 10 deletions
diff --git a/cppu/source/threadpool/current.cxx b/cppu/source/threadpool/current.cxx
index 3135a4ba6344..63992dd87d74 100644
--- a/cppu/source/threadpool/current.cxx
+++ b/cppu/source/threadpool/current.cxx
@@ -63,7 +63,7 @@ static typelib_InterfaceTypeDescription * get_type_XCurrentContext()
1,
pMembers );
- typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
+ typelib_typedescription_register( reinterpret_cast<typelib_TypeDescription**>(&pTD) );
typelib_typedescriptionreference_release( pMembers[0] );
typelib_InterfaceMethodTypeDescription * pMethod = 0;
@@ -85,8 +85,8 @@ static typelib_InterfaceTypeDescription * get_type_XCurrentContext()
sMethodName0.pData,
typelib_TypeClass_ANY, sReturnType0.pData,
1, aParameters, 1, pExceptions );
- typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
- typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
+ typelib_typedescription_register( reinterpret_cast<typelib_TypeDescription**>(&pMethod) );
+ typelib_typedescription_release( &pMethod->aBase.aBase );
// another static ref:
++reinterpret_cast< typelib_TypeDescription * >( pTD )->
nStaticRefCount;
@@ -151,8 +151,8 @@ extern "C" void SAL_CALL delete_IdContainer( void * p )
{
(*pId->pCurrentContextEnv->releaseInterface)(
pId->pCurrentContextEnv, pId->pCurrentContext );
- (*((uno_Environment *)pId->pCurrentContextEnv)->release)(
- (uno_Environment *)pId->pCurrentContextEnv );
+ (*pId->pCurrentContextEnv->aBase.release)(
+ &pId->pCurrentContextEnv->aBase );
}
if (pId->bInit)
{
@@ -196,8 +196,8 @@ extern "C" sal_Bool SAL_CALL uno_setCurrentContext(
{
(*pId->pCurrentContextEnv->releaseInterface)(
pId->pCurrentContextEnv, pId->pCurrentContext );
- (*((uno_Environment *)pId->pCurrentContextEnv)->release)(
- (uno_Environment *)pId->pCurrentContextEnv );
+ (*pId->pCurrentContextEnv->aBase.release)(
+ &pId->pCurrentContextEnv->aBase );
pId->pCurrentContextEnv = 0;
pId->pCurrentContext = 0;
@@ -268,7 +268,7 @@ extern "C" sal_Bool SAL_CALL uno_getCurrentContext(
return sal_False;
}
- Mapping mapping((uno_Environment *) pId->pCurrentContextEnv, target_env.get());
+ Mapping mapping(&pId->pCurrentContextEnv->aBase, target_env.get());
OSL_ASSERT( mapping.is() );
if (! mapping.is())
return sal_False;
diff --git a/cppu/source/threadpool/threadident.cxx b/cppu/source/threadpool/threadident.cxx
index eaf5bc61156e..ce7fdc0efc68 100644
--- a/cppu/source/threadpool/threadident.cxx
+++ b/cppu/source/threadpool/threadident.cxx
@@ -46,7 +46,7 @@ static inline void createLocalId( sal_Sequence **ppThreadId )
(*ppThreadId)->elements[1] = (id >> 8) & 0xFF;
(*ppThreadId)->elements[2] = (id >> 16) & 0xFF;
(*ppThreadId)->elements[3] = (id >> 24) & 0xFF;
- rtl_getGlobalProcessId( (sal_uInt8 * ) &( (*ppThreadId)->elements[4]) );
+ rtl_getGlobalProcessId( reinterpret_cast<sal_uInt8 *>(&(*ppThreadId)->elements[4]) );
}
diff --git a/cppu/source/threadpool/threadpool.hxx b/cppu/source/threadpool/threadpool.hxx
index a6b2fbc14de1..dc17d6490ac8 100644
--- a/cppu/source/threadpool/threadpool.hxx
+++ b/cppu/source/threadpool/threadpool.hxx
@@ -51,7 +51,7 @@ namespace cppu_threadpool {
{
if( a.getLength() >= 4 )
{
- return *(sal_Int32 *)a.getConstArray();
+ return *reinterpret_cast<sal_Int32 const *>(a.getConstArray());
}
return 0;
}