diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-17 19:00:24 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-20 09:06:50 +0100 |
commit | 7b8329866734a25a723596444ad23a1c4f7dbf9b (patch) | |
tree | 00f1def3572a9c058bd5ed2bfb1ad6df817a9d28 /pyuno/source/module/pyuno_module.cxx | |
parent | 00173d8c3a17f9dc00ead78392812a98397cf277 (diff) |
Some more loplugin:cstylecast: pyuno
Change-Id: I80c9fdb45c9f58ac3cd1b0fab2631b903194e268
Diffstat (limited to 'pyuno/source/module/pyuno_module.cxx')
-rw-r--r-- | pyuno/source/module/pyuno_module.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 4968e6602164..c2187afcccd8 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -350,8 +350,7 @@ static PyObject* initTestEnvironment( oslGenericFunction const pFunc( mod.getFunctionSymbol("test_init")); if (!pFunc) { abort(); } - // guess casting pFunc is undefined behavior but don't see a better way - ((void (SAL_CALL *)(XMultiServiceFactory*)) pFunc) (xMSF.get()); + reinterpret_cast<void (SAL_CALL *)(XMultiServiceFactory*)>(pFunc)(xMSF.get()); } catch (const com::sun::star::uno::Exception &) { @@ -403,13 +402,13 @@ static PyObject *createUnoStructHelper( if (idl_class.is ()) { idl_class->createObject (IdlStruct); - PyUNO *me = (PyUNO*)PyUNO_new_UNCHECKED( IdlStruct, c->xInvocation ); - PyRef returnCandidate( (PyObject*)me, SAL_NO_ACQUIRE ); + PyUNO *me = reinterpret_cast<PyUNO*>(PyUNO_new_UNCHECKED( IdlStruct, c->xInvocation )); + PyRef returnCandidate( reinterpret_cast<PyObject*>(me), SAL_NO_ACQUIRE ); TypeDescription desc( typeName ); OSL_ASSERT( desc.is() ); // could already instantiate an XInvocation2 ! typelib_CompoundTypeDescription *pCompType = - ( typelib_CompoundTypeDescription * ) desc.get(); + reinterpret_cast<typelib_CompoundTypeDescription *>(desc.get()); fillStructState state; if ( PyTuple_Size( initializer ) > 0 || PyDict_Size( keywordArgs ) > 0 ) fillStruct( me->members->xInvocation, pCompType, initializer, keywordArgs, state, runtime ); @@ -632,7 +631,7 @@ static PyObject * generateUuid( SAL_UNUSED_PARAMETER PyObject *, SAL_UNUSED_PARAMETER PyObject * ) { Sequence< sal_Int8 > seq( 16 ); - rtl_createUuid( (sal_uInt8*)seq.getArray() , 0 , sal_False ); + rtl_createUuid( reinterpret_cast<sal_uInt8*>(seq.getArray()) , 0 , sal_False ); PyRef ret; try { |