diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-08 16:27:13 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-08 16:27:13 +0200 |
commit | e56bec5ccd7bdd91e0389381dc4e2f1e48f2c32d (patch) | |
tree | 27fddaf04e20cf3a4eb81b9894d12a5df9ffd6b6 /rsc | |
parent | f61f7609db7520246346c5c2c1c5c0496e4773ef (diff) |
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I27516cc532e46b6e43a2f2f292246f1414e9f9b3
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/inc/rscclobj.hxx | 4 | ||||
-rw-r--r-- | rsc/inc/rsctools.hxx | 2 | ||||
-rw-r--r-- | rsc/source/parser/rsckey.cxx | 4 | ||||
-rw-r--r-- | rsc/source/prj/start.cxx | 4 | ||||
-rw-r--r-- | rsc/source/res/rscclass.cxx | 4 | ||||
-rw-r--r-- | rsc/source/res/rscconst.cxx | 4 | ||||
-rw-r--r-- | rsc/source/tools/rsctools.cxx | 6 | ||||
-rw-r--r-- | rsc/source/tools/rsctree.cxx | 12 |
8 files changed, 20 insertions, 20 deletions
diff --git a/rsc/inc/rscclobj.hxx b/rsc/inc/rscclobj.hxx index 674b6b196486..18151148c7e6 100644 --- a/rsc/inc/rscclobj.hxx +++ b/rsc/inc/rscclobj.hxx @@ -47,7 +47,7 @@ public: bool Insert( ObjNode* pTN ) //< insert a new node in the b-tree { - return IdNode::Insert( (IdNode *)pTN ); + return IdNode::Insert( static_cast<IdNode *>(pTN) ); } CLASS_DATA GetRscObj() //< get the Object from this Node @@ -76,7 +76,7 @@ public: } bool Insert( RefNode* pTN ) //< insert a new node in the b-tree { - return IdNode::Insert( (IdNode *)pTN ); + return IdNode::Insert( static_cast<IdNode *>(pTN) ); } bool PutObjNode( ObjNode * pPutObject ); diff --git a/rsc/inc/rsctools.hxx b/rsc/inc/rsctools.hxx index f8d50c02e077..bfff4d5629ac 100644 --- a/rsc/inc/rsctools.hxx +++ b/rsc/inc/rsctools.hxx @@ -74,7 +74,7 @@ public: ~RscPtrPtr(); void Reset(); sal_uInt32 Append( void * ); - sal_uInt32 Append( char * pStr ) { return Append( (void *)pStr ); } + sal_uInt32 Append( char * pStr ) { return Append( static_cast<void *>(pStr) ); } sal_uInt32 GetCount() { return nCount; } void * GetEntry( sal_uInt32 nEle ); void ** GetBlock() { return pMem; } diff --git a/rsc/source/parser/rsckey.cxx b/rsc/source/parser/rsckey.cxx index cddfc0101232..32cb54ec6865 100644 --- a/rsc/source/parser/rsckey.cxx +++ b/rsc/source/parser/rsckey.cxx @@ -64,7 +64,7 @@ void RscNameTable::SetSort( bool bSorted ) if( bSort && pTable) { // Schluesselwort Feld sortieren - qsort( (void *)pTable, nEntries, + qsort( static_cast<void *>(pTable), nEntries, sizeof( KEY_STRUCT ), KeyCompare ); } }; @@ -73,7 +73,7 @@ Atom RscNameTable::Put( Atom nName, sal_uInt32 nTyp, sal_IntPtr nValue ) { if( pTable ) pTable = static_cast<KEY_STRUCT *>( - rtl_reallocateMemory( (void *)pTable, + rtl_reallocateMemory( static_cast<void *>(pTable), ((nEntries +1) * sizeof( KEY_STRUCT )) )); else pTable = static_cast<KEY_STRUCT *>( diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index 181b9f58fb41..b61b8d89a512 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -96,7 +96,7 @@ static bool CallPrePro( const OString& rInput, aNewCmdL.Append( rsc_strdup( rInput.getStr() ) ); aNewCmdL.Append( rsc_strdup( rOutput.getStr() ) ); - aNewCmdL.Append( (void *)0 ); + aNewCmdL.Append( static_cast<void *>(nullptr) ); if ( bVerbose ) { @@ -115,7 +115,7 @@ static bool CallPrePro( const OString& rInput, OStringBuffer aTmpStr; aTmpStr.append('@').append(aRspFileName); aRespCmdL.Append( rsc_strdup( aTmpStr.getStr() ) ); - aRespCmdL.Append( (void *)0 ); + aRespCmdL.Append( static_cast<void *>(nullptr) ); pCmdL = &aRespCmdL; for( i = 0; i < (int)(aNewCmdL.GetCount() -1); i++ ) diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx index 7d7861b607de..1d365b13b0dc 100644 --- a/rsc/source/res/rscclass.cxx +++ b/rsc/source/res/rscclass.cxx @@ -59,7 +59,7 @@ void RscClass::Pre_dtor() RscClass::~RscClass() { if( pVarTypeList ) - rtl_freeMemory( (void *)pVarTypeList ); + rtl_freeMemory( static_cast<void *>(pVarTypeList) ); } RSCCLASS_TYPE RscClass::GetClassType() const @@ -234,7 +234,7 @@ ERRTYPE RscClass::SetVariable( Atom nVarName, { if( pVarTypeList ) { - pVarTypeList = static_cast<VARTYPE_STRUCT *>(rtl_reallocateMemory( (void *)pVarTypeList, + pVarTypeList = static_cast<VARTYPE_STRUCT *>(rtl_reallocateMemory( static_cast<void *>(pVarTypeList), ((nEntries +1) * sizeof( VARTYPE_STRUCT )) )); } else diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx index 77b67475516c..a7a83293d396 100644 --- a/rsc/source/res/rscconst.cxx +++ b/rsc/source/res/rscconst.cxx @@ -36,7 +36,7 @@ RscConst::RscConst( Atom nId, sal_uInt32 nTypeId ) RscConst::~RscConst() { if( pVarArray ) - rtl_freeMemory( (void *)pVarArray ); + rtl_freeMemory( static_cast<void *>(pVarArray) ); } RSCCLASS_TYPE RscConst::GetClassType() const @@ -47,7 +47,7 @@ RSCCLASS_TYPE RscConst::GetClassType() const ERRTYPE RscConst::SetConstant( Atom nVarName, sal_Int32 lValue ) { if( pVarArray ) - pVarArray = static_cast<VarEle *>(rtl_reallocateMemory( (void *)pVarArray, + pVarArray = static_cast<VarEle *>(rtl_reallocateMemory( static_cast<void *>(pVarArray), ((nEntries +1) * sizeof( VarEle )) )); else pVarArray = static_cast<VarEle *>(rtl_allocateMemory( ((nEntries +1) * sizeof( VarEle )) )); diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index 83526835b7f6..45f29afe004a 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -187,7 +187,7 @@ char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv, sal_uInt32 nArgc ) else ppCmd->Append( rsc_strdup( *(ppArgv +i) ) ); } - ppCmd->Append( (void *)0 ); + ppCmd->Append( static_cast<void *>(nullptr) ); return NULL; } @@ -214,7 +214,7 @@ void RscPtrPtr :: Reset() if( pMem[ i ] ) rtl_freeMemory( pMem[ i ] ); } - rtl_freeMemory( (void *)pMem ); + rtl_freeMemory( static_cast<void *>(pMem) ); }; nCount = 0; pMem = NULL; @@ -225,7 +225,7 @@ sal_uInt32 RscPtrPtr :: Append( void * pBuffer ) if( !pMem ) pMem = static_cast<void **>(rtl_allocateMemory( (nCount +1) * sizeof( void * ) )); else - pMem = static_cast<void **>(rtl_reallocateMemory( (void *)pMem, + pMem = static_cast<void **>(rtl_reallocateMemory( static_cast<void *>(pMem), ((nCount +1) * sizeof( void * ) ) )); pMem[ nCount ] = pBuffer; diff --git a/rsc/source/tools/rsctree.cxx b/rsc/source/tools/rsctree.cxx index 10f3d40c97e0..a45880ac0245 100644 --- a/rsc/source/tools/rsctree.cxx +++ b/rsc/source/tools/rsctree.cxx @@ -69,15 +69,15 @@ BiNode * BiNode::ChangeDLListBTree( BiNode * pList ) } else { - pList = (BiNode *)0; + pList = nullptr; } if( NULL != (pTmp = pMiddle->Left()) ) // rechten Zeiger auf Null - pTmp->pRight = (BiNode *)0; + pTmp->pRight = nullptr; // linken Zeiger auf Null BiNode * pRightNode = pMiddle->Right(); if (pRightNode) - pRightNode->pLeft = (BiNode *)0; + pRightNode->pLeft = nullptr; pMiddle->pLeft = ChangeDLListBTree( pList ); pMiddle->pRight = ChangeDLListBTree( pRightNode ); @@ -198,7 +198,7 @@ NameNode* NameNode::SearchParent( const NameNode * pSearch ) const return Right()->SearchParent( pSearch ); } } - return (NameNode *)NULL; + return nullptr; } // search for a node. @@ -327,7 +327,7 @@ void NameNode::SubOrderTree( NameNode * pOrderNode ) IdNode * IdNode::Search( sal_uInt32 nTypeName ) const { - return static_cast<IdNode *>(NameNode::Search( (const void *)&nTypeName )); + return static_cast<IdNode *>(NameNode::Search( static_cast<const void *>(&nTypeName) )); } COMPARE IdNode::Compare( const NameNode * pSearch ) const @@ -358,7 +358,7 @@ sal_uInt32 IdNode::GetId() const StringNode * StringNode::Search( const char * pSearch ) const { - return static_cast<StringNode *>(NameNode::Search( (const void *)pSearch )); + return static_cast<StringNode *>(NameNode::Search( static_cast<const void *>(pSearch) )); } COMPARE StringNode::Compare( const NameNode * pSearch ) const |