summaryrefslogtreecommitdiff
path: root/pyuno/source/module/pyuno.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:05:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:23 +0100
commit8375ac018628a7619c6719dd6fb5761a007e069e (patch)
treef9fadaf8f60b7115c4f47af4453bbab76283147f /pyuno/source/module/pyuno.cxx
parentd0c9cb0c253ea9cff472a811dafb80043d7889a8 (diff)
Clean up C-style casts from pointers to void
Change-Id: I3676d56e65dd2d5b36882073c63e571a79819fee
Diffstat (limited to 'pyuno/source/module/pyuno.cxx')
-rw-r--r--pyuno/source/module/pyuno.cxx38
1 files changed, 19 insertions, 19 deletions
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index cc9555c0062a..1d990d035eeb 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -84,10 +84,10 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
case typelib_TypeClass_INTERFACE:
{
buf.append( "0x" );
- buf.append( reinterpret_cast< sal_IntPtr >(*(void **)pVal), 16 );
+ buf.append( reinterpret_cast< sal_IntPtr >(*static_cast<void * const *>(pVal)), 16 );
if( VAL2STR_MODE_DEEP == mode )
{
- buf.append( "{" ); Reference< XInterface > r = *( Reference< XInterface > * ) pVal;
+ buf.append( "{" ); Reference< XInterface > r = *static_cast<Reference< XInterface > const *>(pVal);
Reference< XServiceInfo > serviceInfo( r, UNO_QUERY);
Reference< XTypeProvider > typeProvider(r,UNO_QUERY);
if( serviceInfo.is() )
@@ -150,7 +150,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
buf.append( " = " );
typelib_TypeDescription * pMemberType = 0;
TYPELIB_DANGER_GET( &pMemberType, ppTypeRefs[nPos] );
- buf.append( val2str( (char *)pVal + pMemberOffsets[nPos], pMemberType->pWeakRef, mode ) );
+ buf.append( val2str( static_cast<char const *>(pVal) + pMemberOffsets[nPos], pMemberType->pWeakRef, mode ) );
TYPELIB_DANGER_RELEASE( pMemberType );
if (nPos < (nDescr -1))
buf.append( ", " );
@@ -166,7 +166,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
typelib_TypeDescription * pTypeDescr = 0;
TYPELIB_DANGER_GET( &pTypeDescr, pTypeRef );
- uno_Sequence * pSequence = *(uno_Sequence **)pVal;
+ uno_Sequence * pSequence = *static_cast<uno_Sequence * const *>(pVal);
typelib_TypeDescription * pElementTypeDescr = 0;
TYPELIB_DANGER_GET( &pElementTypeDescr, reinterpret_cast<typelib_IndirectTypeDescription *>(pTypeDescr)->pType );
@@ -195,17 +195,17 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
}
case typelib_TypeClass_ANY:
buf.append( "{ " );
- buf.append( val2str( ((uno_Any *)pVal)->pData,
- ((uno_Any *)pVal)->pType ,
+ buf.append( val2str( static_cast<uno_Any const *>(pVal)->pData,
+ static_cast<uno_Any const *>(pVal)->pType ,
mode) );
buf.append( " }" );
break;
case typelib_TypeClass_TYPE:
- buf.append( (*(typelib_TypeDescriptionReference **)pVal)->pTypeName );
+ buf.append( (*static_cast<typelib_TypeDescriptionReference * const *>(pVal))->pTypeName );
break;
case typelib_TypeClass_STRING:
buf.append( '\"' );
- buf.append( *(rtl_uString **)pVal );
+ buf.append( *static_cast<rtl_uString * const *>(pVal) );
buf.append( '\"' );
break;
case typelib_TypeClass_ENUM:
@@ -217,7 +217,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
sal_Int32 nPos = reinterpret_cast<typelib_EnumTypeDescription *>(pTypeDescr)->nEnumValues;
while (nPos--)
{
- if (pValues[nPos] == *(int *)pVal)
+ if (pValues[nPos] == *static_cast<int const *>(pVal))
break;
}
if (nPos >= 0)
@@ -229,41 +229,41 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
break;
}
case typelib_TypeClass_BOOLEAN:
- if (*(sal_Bool *)pVal)
+ if (*static_cast<sal_Bool const *>(pVal))
buf.append( "true" );
else
buf.append( "false" );
break;
case typelib_TypeClass_CHAR:
buf.append( '\'' );
- buf.append( *(sal_Unicode *)pVal );
+ buf.append( *static_cast<sal_Unicode const *>(pVal) );
buf.append( '\'' );
break;
case typelib_TypeClass_FLOAT:
- buf.append( *(float *)pVal );
+ buf.append( *static_cast<float const *>(pVal) );
break;
case typelib_TypeClass_DOUBLE:
- buf.append( *(double *)pVal );
+ buf.append( *static_cast<double const *>(pVal) );
break;
case typelib_TypeClass_BYTE:
buf.append( "0x" );
- buf.append( (sal_Int32)*(sal_Int8 *)pVal, 16 );
+ buf.append( (sal_Int32)*static_cast<sal_Int8 const *>(pVal), 16 );
break;
case typelib_TypeClass_SHORT:
buf.append( "0x" );
- buf.append( (sal_Int32)*(sal_Int16 *)pVal, 16 );
+ buf.append( (sal_Int32)*static_cast<sal_Int16 const *>(pVal), 16 );
break;
case typelib_TypeClass_UNSIGNED_SHORT:
buf.append( "0x" );
- buf.append( (sal_Int32)*(sal_uInt16 *)pVal, 16 );
+ buf.append( (sal_Int32)*static_cast<sal_uInt16 const *>(pVal), 16 );
break;
case typelib_TypeClass_LONG:
buf.append( "0x" );
- buf.append( *(sal_Int32 *)pVal, 16 );
+ buf.append( *static_cast<sal_Int32 const *>(pVal), 16 );
break;
case typelib_TypeClass_UNSIGNED_LONG:
buf.append( "0x" );
- buf.append( (sal_Int64)*(sal_uInt32 *)pVal, 16 );
+ buf.append( (sal_Int64)*static_cast<sal_uInt32 const *>(pVal), 16 );
break;
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
@@ -278,7 +278,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
buf.append( aVal, 16 );
}
#else
- buf.append( *(sal_Int64 *)pVal, 16 );
+ buf.append( *static_cast<sal_Int64 const *>(pVal), 16 );
#endif
break;