From 58f60b5108c584aa44f353f2fcbd07b81d474e48 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 8 Jun 2015 16:28:28 +0200 Subject: loplugin:cstylecast: deal with remaining pointer casts Change-Id: I1666375abb72566e71804ac82b22d3a5ea590b78 --- svl/source/items/globalnameitem.cxx | 4 ++-- svl/source/items/itemset.cxx | 6 +++--- svl/source/items/lckbitem.cxx | 2 +- svl/source/numbers/zforlist.cxx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/svl/source/items/globalnameitem.cxx b/svl/source/items/globalnameitem.cxx index 6e1f5ff8a043..1c02c1d4933b 100644 --- a/svl/source/items/globalnameitem.cxx +++ b/svl/source/items/globalnameitem.cxx @@ -80,7 +80,7 @@ bool SfxGlobalNameItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt aNew >>= aSeq; if ( aSeq.getLength() == 16 ) { - m_aName.MakeFromMemory( (void*) aSeq.getConstArray() ); + m_aName.MakeFromMemory( const_cast(aSeq.getConstArray()) ); return true; } @@ -92,7 +92,7 @@ bool SfxGlobalNameItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt bool SfxGlobalNameItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const { com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 ); - void* pData = ( void* ) &m_aName.GetCLSID(); + void const * pData = &m_aName.GetCLSID(); memcpy( aSeq.getArray(), pData, 16 ); rVal <<= aSeq; return true; diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 48627064aca9..301bafc2bfab 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -1634,7 +1634,7 @@ void SfxItemSet::dumpAsXml(xmlTextWriterPtr pWriter) const // ----------------------------------------------- class SfxAllItemSet SfxAllItemSet::SfxAllItemSet( SfxItemPool &rPool ) -: SfxItemSet(rPool, (const sal_uInt16*) 0), +: SfxItemSet(rPool, nullptr), aDefault(0), nFree(nInitCount) { @@ -1707,11 +1707,11 @@ static SfxItemArray AddItem_Impl(SfxItemArray pItems, sal_uInt16 nOldSize, sal_u { // Copy all Items before nPos if ( nPos ) - memcpy( (void*) pNew, pItems, nPos * sizeof(SfxPoolItem *) ); + memcpy( static_cast(pNew), pItems, nPos * sizeof(SfxPoolItem *) ); // Copy all Items after nPos if ( nPos < nOldSize ) - memcpy( (void*) (pNew + nPos + 1), pItems + nPos, + memcpy( static_cast(pNew + nPos + 1), pItems + nPos, (nOldSize-nPos) * sizeof(SfxPoolItem *) ); } diff --git a/svl/source/items/lckbitem.cxx b/svl/source/items/lckbitem.cxx index bb7bb89a9fa4..169219f416d4 100644 --- a/svl/source/items/lckbitem.cxx +++ b/svl/source/items/lckbitem.cxx @@ -121,7 +121,7 @@ bool SfxLockBytesItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 if ( aSeq.getLength() ) { SvMemoryStream* pStream = new SvMemoryStream(); - pStream->Write( (void*)aSeq.getConstArray(), aSeq.getLength() ); + pStream->Write( aSeq.getConstArray(), aSeq.getLength() ); pStream->Seek(0); _xVal = new SvLockBytes( pStream, true ); diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index d17954ec99cf..19c5d95fa436 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -326,7 +326,7 @@ Color* SvNumberFormatter::GetUserDefColor(sal_uInt16 nIndex) { if( aColorLink.IsSet() ) { - return reinterpret_cast( aColorLink.Call( (void*) &nIndex )) ; + return reinterpret_cast( aColorLink.Call( static_cast(&nIndex) )) ; } else { -- cgit v1.2.3