diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:05:38 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:09:24 +0100 |
commit | cf54f2a10f128cf5d79397911b5be710e7081963 (patch) | |
tree | cbaf1036cfca3572cb5d7b1df7c2f46de99168cb /rsc/source/parser/rsckey.cxx | |
parent | d963fd84256081ce6a2e0ab1e9c0516cfb0b38b9 (diff) |
Clean up C-style casts from pointers to void
Change-Id: I85d6761e72ba2f67a1d67a94cae674cbb271b43f
Diffstat (limited to 'rsc/source/parser/rsckey.cxx')
-rw-r--r-- | rsc/source/parser/rsckey.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rsc/source/parser/rsckey.cxx b/rsc/source/parser/rsckey.cxx index b60a290362e4..7b721bb0891b 100644 --- a/rsc/source/parser/rsckey.cxx +++ b/rsc/source/parser/rsckey.cxx @@ -36,9 +36,9 @@ extern "C" { int SAL_CALL KeyCompare( const void * pFirst, const void * pSecond ) { - if( ((KEY_STRUCT *)pFirst)->nName > ((KEY_STRUCT *)pSecond)->nName ) + if( static_cast<KEY_STRUCT const *>(pFirst)->nName > static_cast<KEY_STRUCT const *>(pSecond)->nName ) return 1; - else if( ((KEY_STRUCT *)pFirst)->nName < ((KEY_STRUCT *)pSecond)->nName ) + else if( static_cast<KEY_STRUCT const *>(pFirst)->nName < static_cast<KEY_STRUCT const *>(pSecond)->nName ) return -1; else return 0; @@ -72,13 +72,13 @@ void RscNameTable::SetSort( bool bSorted ) Atom RscNameTable::Put( Atom nName, sal_uInt32 nTyp, long nValue ) { if( pTable ) - pTable = (KEY_STRUCT *) + pTable = static_cast<KEY_STRUCT *>( rtl_reallocateMemory( (void *)pTable, - ((nEntries +1) * sizeof( KEY_STRUCT )) ); + ((nEntries +1) * sizeof( KEY_STRUCT )) )); else - pTable = (KEY_STRUCT *) + pTable = static_cast<KEY_STRUCT *>( rtl_allocateMemory( ((nEntries +1) - * sizeof( KEY_STRUCT )) ); + * sizeof( KEY_STRUCT )) )); pTable[ nEntries ].nName = nName; pTable[ nEntries ].nTyp = nTyp; |