From 7b8329866734a25a723596444ad23a1c4f7dbf9b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 17 Jan 2015 19:00:24 +0100 Subject: Some more loplugin:cstylecast: pyuno Change-Id: I80c9fdb45c9f58ac3cd1b0fab2631b903194e268 --- pyuno/source/module/pyuno_runtime.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pyuno/source/module/pyuno_runtime.cxx') diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 3825f2af9ab6..cafd84b1047b 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -161,7 +161,7 @@ static PyRef importUnoModule( ) throw ( RuntimeException ) if( PyErr_Occurred() ) { PyRef excType, excValue, excTraceback; - PyErr_Fetch( (PyObject **)&excType, (PyObject**)&excValue,(PyObject**)&excTraceback); + PyErr_Fetch( reinterpret_cast(&excType), reinterpret_cast(&excValue), reinterpret_cast(&excTraceback)); // As of Python 2.7 this gives a rather non-useful "", // but it is the best we can do in the absence of uno._uno_extract_printable_stacktrace // Who knows, a future Python might print something better. @@ -186,7 +186,7 @@ static void readLoggingConfig( sal_Int32 *pLevel, FILE **ppFile ) OUString fileName; osl_getModuleURLFromFunctionAddress( reinterpret_cast< oslGenericFunction >(readLoggingConfig), - (rtl_uString **) &fileName ); + &fileName.pData ); fileName = fileName.copy( fileName.lastIndexOf( '/' )+1 ); #ifdef MACOSX fileName += "../" LIBO_ETC_FOLDER "/"; @@ -460,7 +460,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const { desc.makeComplete(); typelib_EnumTypeDescription *pEnumDesc = - (typelib_EnumTypeDescription *) desc.get(); + reinterpret_cast(desc.get()); for( int i = 0 ; i < pEnumDesc->nEnumValues ; i ++ ) { if( pEnumDesc->pEnumValues[i] == l ) @@ -740,7 +740,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con if( PyStrBytes_Check( str.get() ) ) { seq = Sequence ( - (sal_Int8*) PyStrBytes_AsString(str.get()), PyStrBytes_Size(str.get())); + reinterpret_cast(PyStrBytes_AsString(str.get())), PyStrBytes_Size(str.get())); } a <<= seq; } @@ -757,7 +757,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con else if( isInstanceOfStructOrException( o ) ) { PyRef struc(PyObject_GetAttrString( o , "value" ),SAL_NO_ACQUIRE); - PyUNO * obj = (PyUNO*)struc.get(); + PyUNO * obj = reinterpret_cast(struc.get()); Reference< XMaterialHolder > holder( obj->members->xInvocation, UNO_QUERY ); if( holder.is( ) ) a = holder->getMaterial(); @@ -770,7 +770,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con else if( PyObject_IsInstance( o, getPyUnoClass().get() ) ) { PyUNO* o_pi; - o_pi = (PyUNO*) o; + o_pi = reinterpret_cast(o); if (o_pi->members->wrappedObject.getValueTypeClass () == com::sun::star::uno::TypeClass_STRUCT || o_pi->members->wrappedObject.getValueTypeClass () == -- cgit v1.2.3