summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:24:16 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:24:16 +0200
commitcd14c536643219712c0afe437029043238e33967 (patch)
tree7c63d111c3df364496d8716090b4d4b363db50ca /cppu
parent98215b5bdb07cb0ff2cfea8b5c85eab07a11eda1 (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I2d60f21219adfe9935ad69620f3a7bd856f96376
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx2
-rw-r--r--cppu/source/threadpool/threadpool.cxx4
-rw-r--r--cppu/source/typelib/typelib.cxx6
-rw-r--r--cppu/source/uno/lbenv.cxx4
4 files changed, 8 insertions, 8 deletions
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
index 250ad9dede94..20c121b8d037 100644
--- a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
+++ b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx
@@ -132,7 +132,7 @@ Mapping::Mapping(uno_Environment * pFrom,
uno_Mapping::acquire = s_acquire;
uno_Mapping::release = s_release;
- uno_Mapping::mapInterface = (uno_MapInterfaceFunc)s_mapInterface;
+ uno_Mapping::mapInterface = s_mapInterface;
}
Mapping::~Mapping()
diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx
index 5cfb7e63e8b1..965afcec3527 100644
--- a/cppu/source/threadpool/threadpool.cxx
+++ b/cppu/source/threadpool/threadpool.cxx
@@ -265,7 +265,7 @@ namespace cppu_threadpool
if( ii == m_mapQueue.end() )
{
- m_mapQueue[ aThreadId ] = pair < JobQueue * , JobQueue * > ( (JobQueue *)0 , (JobQueue*)0 );
+ m_mapQueue[ aThreadId ] = pair < JobQueue * , JobQueue * > ( nullptr , nullptr );
ii = m_mapQueue.find( aThreadId );
OSL_ASSERT( ii != m_mapQueue.end() );
}
@@ -308,7 +308,7 @@ namespace cppu_threadpool
if( ii == m_mapQueue.end() )
{
JobQueue *p = new JobQueue();
- m_mapQueue[ aThreadId ] = pair< JobQueue * , JobQueue * > ( p , (JobQueue*)0 );
+ m_mapQueue[ aThreadId ] = pair< JobQueue * , JobQueue * > ( p , nullptr );
}
else if( 0 == (*ii).second.first )
{
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 01f467cf3124..ff76c8c98be1 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -1424,7 +1424,7 @@ extern "C" void SAL_CALL typelib_typedescription_release(
{
MutexGuard aGuard( rInit.getMutex() );
WeakMap_Impl::iterator aIt = rInit.pWeakMap->find( pTD->pTypeName->buffer );
- if( aIt != rInit.pWeakMap->end() && (void *)(*aIt).second == (void *)pTD )
+ if( aIt != rInit.pWeakMap->end() && static_cast<void *>((*aIt).second) == static_cast<void *>(pTD) )
{
// remove only if it contains the same object
rInit.pWeakMap->erase( aIt );
@@ -1513,7 +1513,7 @@ extern "C" void SAL_CALL typelib_typedescription_register(
}
// !reallyWeak
- if (((void *)pTDR != (void *)*ppNewDescription) && // if different
+ if ((static_cast<void *>(pTDR) != static_cast<void *>(*ppNewDescription)) && // if different
(!pTDR->pType->pWeakRef || // uninit: ref data only set
// new one is complete:
(!pTDR->pType->bComplete && (*ppNewDescription)->bComplete) ||
@@ -1585,7 +1585,7 @@ extern "C" void SAL_CALL typelib_typedescription_register(
// description is the weak itself, so register it
(*rInit.pWeakMap)[pTDR->pTypeName->buffer] = pTDR;
- OSL_ASSERT( (void *)*ppNewDescription == (void *)pTDR );
+ OSL_ASSERT( static_cast<void *>(*ppNewDescription) == static_cast<void *>(pTDR) );
}
// By default this reference is not really weak. The reference hold the description
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index cc7a02e3364a..8068e12c38de 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -244,7 +244,7 @@ static void SAL_CALL defenv_registerInterface(
// try to insert dummy 0:
std::pair<OId2ObjectMap::iterator, bool> const insertion(
- that->aOId2ObjectMap.insert( OId2ObjectMap::value_type( rOId, (ObjectEntry*)0 ) ) );
+ that->aOId2ObjectMap.insert( OId2ObjectMap::value_type( rOId, nullptr ) ) );
if (insertion.second)
{
ObjectEntry * pOEntry = new ObjectEntry( rOId );
@@ -292,7 +292,7 @@ static void SAL_CALL defenv_registerProxyInterface(
// try to insert dummy 0:
std::pair<OId2ObjectMap::iterator, bool> const insertion(
- that->aOId2ObjectMap.insert( OId2ObjectMap::value_type( rOId, (ObjectEntry*)0 ) ) );
+ that->aOId2ObjectMap.insert( OId2ObjectMap::value_type( rOId, nullptr ) ) );
if (insertion.second)
{
ObjectEntry * pOEntry = new ObjectEntry( rOId );