Kaydet (Commit) 4aa7d9e6 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:redundantcast: redundant static_casts in comphelper

Change-Id: I6112c3cc40383d00ea134bdc650e457f942e0dcf
üst 7fdbdc53
...@@ -113,7 +113,7 @@ sal_Int32 SAL_CALL UNOMemoryStream::readBytes( Sequence< sal_Int8 >& aData, sal_ ...@@ -113,7 +113,7 @@ sal_Int32 SAL_CALL UNOMemoryStream::readBytes( Sequence< sal_Int8 >& aData, sal_
if( nBytesToRead ) if( nBytesToRead )
{ {
sal_Int8* pData = static_cast<sal_Int8*>(&(*maData.begin())); sal_Int8* pData = &(*maData.begin());
sal_Int8* pCursor = &((pData)[mnCursor]); sal_Int8* pCursor = &((pData)[mnCursor]);
memcpy( static_cast<void*>(aData.getArray()), static_cast<void*>(pCursor), nBytesToRead ); memcpy( static_cast<void*>(aData.getArray()), static_cast<void*>(pCursor), nBytesToRead );
...@@ -188,7 +188,7 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData ) t ...@@ -188,7 +188,7 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData ) t
if( static_cast< sal_Int32 >( nNewSize ) > static_cast< sal_Int32 >( maData.size() ) ) if( static_cast< sal_Int32 >( nNewSize ) > static_cast< sal_Int32 >( maData.size() ) )
maData.resize( static_cast< sal_Int32 >( nNewSize ) ); maData.resize( static_cast< sal_Int32 >( nNewSize ) );
sal_Int8* pData = static_cast<sal_Int8*>(&(*maData.begin())); sal_Int8* pData = &(*maData.begin());
sal_Int8* pCursor = &(pData[mnCursor]); sal_Int8* pCursor = &(pData[mnCursor]);
memcpy( pCursor, aData.getConstArray(), nBytesToWrite ); memcpy( pCursor, aData.getConstArray(), nBytesToWrite );
......
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