summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-10-30 13:28:47 +0100
committerMichael Stahl <mstahl@redhat.com>2015-10-30 16:09:37 +0100
commit0b6a0d4c3184794711e25d06b42a4be171c139a6 (patch)
tree6459f6352c9e727ca3ed866638b385247cb88af0 /bridges
parentf76c3a1fb5ebc6684be6da3f32b80bd750688f81 (diff)
bridges: loplugin:cstylecast
Change-Id: I8613f1f7f2155aa972fa4f841ebfcf6e07e45821
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx12
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/except.cxx4
2 files changed, 8 insertions, 8 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
index af2080658460..94d94d864b9c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
@@ -106,26 +106,26 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
break;
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
- ((long*)pRegisterReturn)[1] = edx;
+ static_cast<long*>(pRegisterReturn)[1] = edx;
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_CHAR:
case typelib_TypeClass_ENUM:
- ((long*)pRegisterReturn)[0] = eax;
+ static_cast<long*>(pRegisterReturn)[0] = eax;
break;
case typelib_TypeClass_SHORT:
case typelib_TypeClass_UNSIGNED_SHORT:
- *(unsigned short*)pRegisterReturn = eax;
+ *static_cast<unsigned short*>(pRegisterReturn) = eax;
break;
case typelib_TypeClass_BOOLEAN:
case typelib_TypeClass_BYTE:
- *(unsigned char*)pRegisterReturn = eax;
+ *static_cast<unsigned char*>(pRegisterReturn) = eax;
break;
case typelib_TypeClass_FLOAT:
- asm ( "fstps %0" : : "m"(*(char *)pRegisterReturn) );
+ asm ( "fstps %0" : : "m"(*static_cast<char *>(pRegisterReturn)) );
break;
case typelib_TypeClass_DOUBLE:
- asm ( "fstpl %0\n\t" : : "m"(*(char *)pRegisterReturn) );
+ asm ( "fstpl %0\n\t" : : "m"(*static_cast<char *>(pRegisterReturn)) );
break;
default:
{
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
index f26e4eacce14..61ae30732762 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
@@ -168,7 +168,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
{
// ensure availability of base
type_info * base_rtti = getRTTI(
- (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription );
+ pTypeDescr->pBaseTypeDescription);
rtti = new __si_class_type_info(
strdup( rttiName ), static_cast<__class_type_info *>(base_rtti) );
}
@@ -257,7 +257,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
#endif
}
}
- rtti = (type_info *)s_rtti->getRTTI( reinterpret_cast<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)