From 0bd502af47b53bc4340df7874bd726361e3bbad9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 29 Mar 2015 09:17:00 +0200 Subject: Clean up remaining C-style casts among void pointers Change-Id: I1b49c020d597b569e330482f4dbf20c15ccdae3f --- stoc/source/corereflection/base.hxx | 2 +- stoc/source/corereflection/criface.cxx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'stoc/source/corereflection') diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx index 7c83960acd4f..d81cf768acf6 100644 --- a/stoc/source/corereflection/base.hxx +++ b/stoc/source/corereflection/base.hxx @@ -425,7 +425,7 @@ inline bool coerce_assign( { return uno_type_assignData( pDest, pTD->pWeakRef, - (void *)rSource.getValue(), rSource.getValueTypeRef(), + const_cast(rSource.getValue()), rSource.getValueTypeRef(), reinterpret_cast< uno_QueryInterfaceFunc >(css::uno::cpp_queryInterface), reinterpret_cast< uno_AcquireFunc >(css::uno::cpp_acquire), reinterpret_cast< uno_ReleaseFunc >(css::uno::cpp_release) ); diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx index a3b72bc47ebf..560d6329e219 100644 --- a/stoc/source/corereflection/criface.cxx +++ b/stoc/source/corereflection/criface.cxx @@ -258,7 +258,7 @@ void IdlAttributeFieldImpl::set( Any & rObj, const Any & rValue ) // construct temp uno val to do proper assignment: todo opt void * pTemp = alloca( pValueTD->nSize ); uno_copyAndConvertData( - pTemp, (void *)rValue.getValue(), pValueTD, getReflection()->getCpp2Uno().get() ); + pTemp, const_cast(rValue.getValue()), pValueTD, getReflection()->getCpp2Uno().get() ); uno_constructData( pArg, pTD ); // assignment does simple conversion @@ -636,14 +636,14 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > & pCppArgs[nPos].getValueTypeRef(), pTD->pWeakRef )) { uno_type_copyAndConvertData( - ppUnoArgs[nPos], (void *)pCppArgs[nPos].getValue(), + ppUnoArgs[nPos], const_cast(pCppArgs[nPos].getValue()), pCppArgs[nPos].getValueTypeRef(), getReflection()->getCpp2Uno().get() ); bAssign = true; } else if (pTD->eTypeClass == typelib_TypeClass_ANY) { uno_type_any_constructAndConvert( - static_cast(ppUnoArgs[nPos]), (void *)pCppArgs[nPos].getValue(), + static_cast(ppUnoArgs[nPos]), const_cast(pCppArgs[nPos].getValue()), pCppArgs[nPos].getValueTypeRef(), getReflection()->getCpp2Uno().get() ); bAssign = true; } @@ -666,7 +666,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > & // construct temp uno val to do proper assignment: todo opt void * pTemp = alloca( pValueTD->nSize ); uno_copyAndConvertData( - pTemp, (void *)pCppArgs[nPos].getValue(), pValueTD, + pTemp, const_cast(pCppArgs[nPos].getValue()), pValueTD, getReflection()->getCpp2Uno().get() ); uno_constructData( ppUnoArgs[nPos], pTD ); -- cgit