Kaydet (Commit) 0b6a0d4c authored tarafından Michael Stahl's avatar Michael Stahl

bridges: loplugin:cstylecast

Change-Id: I8613f1f7f2155aa972fa4f841ebfcf6e07e45821
üst f76c3a1f
...@@ -106,26 +106,26 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod( ...@@ -106,26 +106,26 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
break; break;
case typelib_TypeClass_HYPER: case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER: case typelib_TypeClass_UNSIGNED_HYPER:
((long*)pRegisterReturn)[1] = edx; static_cast<long*>(pRegisterReturn)[1] = edx;
case typelib_TypeClass_LONG: case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG: case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_CHAR: case typelib_TypeClass_CHAR:
case typelib_TypeClass_ENUM: case typelib_TypeClass_ENUM:
((long*)pRegisterReturn)[0] = eax; static_cast<long*>(pRegisterReturn)[0] = eax;
break; break;
case typelib_TypeClass_SHORT: case typelib_TypeClass_SHORT:
case typelib_TypeClass_UNSIGNED_SHORT: case typelib_TypeClass_UNSIGNED_SHORT:
*(unsigned short*)pRegisterReturn = eax; *static_cast<unsigned short*>(pRegisterReturn) = eax;
break; break;
case typelib_TypeClass_BOOLEAN: case typelib_TypeClass_BOOLEAN:
case typelib_TypeClass_BYTE: case typelib_TypeClass_BYTE:
*(unsigned char*)pRegisterReturn = eax; *static_cast<unsigned char*>(pRegisterReturn) = eax;
break; break;
case typelib_TypeClass_FLOAT: case typelib_TypeClass_FLOAT:
asm ( "fstps %0" : : "m"(*(char *)pRegisterReturn) ); asm ( "fstps %0" : : "m"(*static_cast<char *>(pRegisterReturn)) );
break; break;
case typelib_TypeClass_DOUBLE: case typelib_TypeClass_DOUBLE:
asm ( "fstpl %0\n\t" : : "m"(*(char *)pRegisterReturn) ); asm ( "fstpl %0\n\t" : : "m"(*static_cast<char *>(pRegisterReturn)) );
break; break;
default: default:
{ {
......
...@@ -168,7 +168,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) ...@@ -168,7 +168,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
{ {
// ensure availability of base // ensure availability of base
type_info * base_rtti = getRTTI( type_info * base_rtti = getRTTI(
(typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription ); pTypeDescr->pBaseTypeDescription);
rtti = new __si_class_type_info( rtti = new __si_class_type_info(
strdup( rttiName ), static_cast<__class_type_info *>(base_rtti) ); strdup( rttiName ), static_cast<__class_type_info *>(base_rtti) );
} }
...@@ -257,7 +257,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) ...@@ -257,7 +257,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
#endif #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 ); TYPELIB_DANGER_RELEASE( pTypeDescr );
assert(rtti && "### no rtti for throwing exception!"); assert(rtti && "### no rtti for throwing exception!");
if (! rtti) if (! rtti)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment