Kaydet (Commit) 8ca53be7 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:cstylecast: deal with remaining pointer casts

Change-Id: Iedee28da32a4333a414e06877f87851345bb4e9b
üst e5de5696
...@@ -66,7 +66,7 @@ inline DbgData* DbgGetData() ...@@ -66,7 +66,7 @@ inline DbgData* DbgGetData()
inline void DbgSaveData( const DbgData& rData ) inline void DbgSaveData( const DbgData& rData )
{ {
DbgFunc( DBG_FUNC_SAVEDATA, (void*)&rData ); DbgFunc( DBG_FUNC_SAVEDATA, const_cast<DbgData *>(&rData) );
} }
inline bool DbgIsResource() inline bool DbgIsResource()
......
...@@ -258,7 +258,7 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam ) ...@@ -258,7 +258,7 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam )
DebugData* pDebugData = ImplGetDebugData(); DebugData* pDebugData = ImplGetDebugData();
if ( nAction == DBG_FUNC_GETDATA ) if ( nAction == DBG_FUNC_GETDATA )
return (void*)&(pDebugData->aDbgData); return static_cast<void*>(&(pDebugData->aDbgData));
else else
{ {
switch ( nAction ) switch ( nAction )
......
...@@ -45,7 +45,7 @@ void BigInt::MakeBigInt( const BigInt& rVal ) ...@@ -45,7 +45,7 @@ void BigInt::MakeBigInt( const BigInt& rVal )
{ {
if ( rVal.bIsBig ) if ( rVal.bIsBig )
{ {
memcpy( (void*)this, (const void*)&rVal, sizeof( BigInt ) ); memcpy( static_cast<void*>(this), static_cast<const void*>(&rVal), sizeof( BigInt ) );
while ( nLen > 1 && nNum[nLen-1] == 0 ) while ( nLen > 1 && nNum[nLen-1] == 0 )
nLen--; nLen--;
} }
...@@ -476,7 +476,7 @@ BigInt::BigInt( const BigInt& rBigInt ) ...@@ -476,7 +476,7 @@ BigInt::BigInt( const BigInt& rBigInt )
, bIsNeg(false) , bIsNeg(false)
{ {
if ( rBigInt.bIsBig ) if ( rBigInt.bIsBig )
memcpy( (void*)this, (const void*)&rBigInt, sizeof( BigInt ) ); memcpy( static_cast<void*>(this), static_cast<const void*>(&rBigInt), sizeof( BigInt ) );
else else
{ {
bIsSet = rBigInt.bIsSet; bIsSet = rBigInt.bIsSet;
...@@ -647,7 +647,7 @@ BigInt& BigInt::operator=( const BigInt& rBigInt ) ...@@ -647,7 +647,7 @@ BigInt& BigInt::operator=( const BigInt& rBigInt )
return *this; return *this;
if ( rBigInt.bIsBig ) if ( rBigInt.bIsBig )
memcpy( (void*)this, (const void*)&rBigInt, sizeof( BigInt ) ); memcpy( static_cast<void*>(this), static_cast<const void*>(&rBigInt), sizeof( BigInt ) );
else else
{ {
bIsSet = rBigInt.bIsSet; bIsSet = rBigInt.bIsSet;
......
...@@ -704,7 +704,7 @@ void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr, ...@@ -704,7 +704,7 @@ void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr,
static void RscException_Impl() static void RscException_Impl()
{ {
switch ( osl_raiseSignal( OSL_SIGNAL_USER_RESOURCEFAILURE, (void*)"" ) ) switch ( osl_raiseSignal( OSL_SIGNAL_USER_RESOURCEFAILURE, const_cast<char *>("") ) )
{ {
case osl_Signal_ActCallNextHdl: case osl_Signal_ActCallNextHdl:
abort(); abort();
......
...@@ -72,9 +72,9 @@ void ZCodec::BeginCompression( int nCompressLevel, bool updateCrc, bool gzLib ) ...@@ -72,9 +72,9 @@ void ZCodec::BeginCompression( int nCompressLevel, bool updateCrc, bool gzLib )
mnCompressLevel = nCompressLevel; mnCompressLevel = nCompressLevel;
mbUpdateCrc = updateCrc; mbUpdateCrc = updateCrc;
mbGzLib = gzLib; mbGzLib = gzLib;
PZSTREAM->zalloc = ( alloc_func )0; PZSTREAM->zalloc = nullptr;
PZSTREAM->zfree = ( free_func )0; PZSTREAM->zfree = nullptr;
PZSTREAM->opaque = ( voidpf )0; PZSTREAM->opaque = nullptr;
PZSTREAM->avail_out = PZSTREAM->avail_in = 0; PZSTREAM->avail_out = PZSTREAM->avail_in = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment