summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-22 19:35:21 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-22 19:36:50 +0100
commit59e928b010279f002c0553b5c69a7de510ff5036 (patch)
treec3480736308b52936f8d8bdf57a701a6d0b83e1e /bridges
parent186508874e2e4e3b478a4b306cdbb5c50c562313 (diff)
loplugin:cstylecast (MACOSX)
Change-Id: Iaefde6a2fbe1b37f31435217c9f57d611d255b11
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx16
2 files changed, 10 insertions, 10 deletions
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index b1e40bdf65e9..8055a8b8e754 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -173,7 +173,7 @@ std::type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
{
std::type_info * rtti;
- OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
+ OUString const & unoName = OUString::unacquired(&pTypeDescr->aBase.pTypeName);
MutexGuard guard( m_mutex );
t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) );
@@ -311,7 +311,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
#endif
}
}
- rtti = s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
+ rtti = s_rtti->getRTTI( reinterpret_cast<typelib_CompoundTypeDescription *>(pTypeDescr) );
TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti && "### no rtti for throwing exception!");
if (! rtti)
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
index 7a9654c611ce..a90d0304be58 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
@@ -318,7 +318,7 @@ void unoInterfaceProxyDispatch(
{
#if OSL_DEBUG_LEVEL > 0
// determine vtable call index
- sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
+ sal_Int32 nMemberPos = reinterpret_cast<typelib_InterfaceMemberTypeDescription const *>(pMemberDescr)->nPosition;
assert(nMemberPos < pTypeDescr->nAllMembers);
#endif
VtableSlot aVtableSlot(
@@ -332,7 +332,7 @@ void unoInterfaceProxyDispatch(
// dependent dispatch
cpp_call(
pThis, aVtableSlot,
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
+ reinterpret_cast<typelib_InterfaceAttributeTypeDescription const *>(pMemberDescr)->pAttributeTypeRef,
0, 0, // no params
pReturn, pArgs, ppException );
}
@@ -341,7 +341,7 @@ void unoInterfaceProxyDispatch(
// is SET
typelib_MethodParameter aParam;
aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
+ reinterpret_cast<typelib_InterfaceAttributeTypeDescription const *>(pMemberDescr)->pAttributeTypeRef;
aParam.bIn = sal_True;
aParam.bOut = sal_False;
@@ -367,7 +367,7 @@ void unoInterfaceProxyDispatch(
{
#if OSL_DEBUG_LEVEL > 0
// determine vtable call index
- sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
+ sal_Int32 nMemberPos = reinterpret_cast<typelib_InterfaceMemberTypeDescription const *>(pMemberDescr)->nPosition;
assert(nMemberPos < pTypeDescr->nAllMembers);
#endif
VtableSlot aVtableSlot(
@@ -396,7 +396,7 @@ void unoInterfaceProxyDispatch(
uno_Interface * pInterface = 0;
(*pThis->getBridge()->getUnoEnv()->getRegisteredInterface)(
pThis->getBridge()->getUnoEnv(),
- (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
+ reinterpret_cast<void **>(&pInterface), pThis->oid.pData, reinterpret_cast<typelib_InterfaceTypeDescription *>(pTD) );
if (pInterface)
{
@@ -415,9 +415,9 @@ void unoInterfaceProxyDispatch(
// dependent dispatch
cpp_call(
pThis, aVtableSlot,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
+ reinterpret_cast<typelib_InterfaceMethodTypeDescription const *>(pMemberDescr)->pReturnTypeRef,
+ reinterpret_cast<typelib_InterfaceMethodTypeDescription const *>(pMemberDescr)->nParams,
+ reinterpret_cast<typelib_InterfaceMethodTypeDescription const *>(pMemberDescr)->pParams,
pReturn, pArgs, ppException );
}
break;