Kaydet (Commit) 609707dd authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:cstylecast: deal with those that are (technically) const_cast

Change-Id: Ie77fdb078c9c8f8ed01dfd6c5dd583c6535803b2
üst 04b9ff9a
...@@ -737,7 +737,7 @@ static void unzipToBuffer( char* pBegin, unsigned int nLen, ...@@ -737,7 +737,7 @@ static void unzipToBuffer( char* pBegin, unsigned int nLen,
const unsigned int buf_increment_size = 16384; const unsigned int buf_increment_size = 16384;
*pOutBuf = static_cast<sal_uInt8*>(rtl_reallocateMemory( *pOutBuf, buf_increment_size )); *pOutBuf = static_cast<sal_uInt8*>(rtl_reallocateMemory( *pOutBuf, buf_increment_size ));
aZStr.next_out = (Bytef*)*pOutBuf; aZStr.next_out = reinterpret_cast<Bytef*>(*pOutBuf);
aZStr.avail_out = buf_increment_size; aZStr.avail_out = buf_increment_size;
*pOutLen = buf_increment_size; *pOutLen = buf_increment_size;
while( err != Z_STREAM_END && err >= Z_OK && aZStr.avail_in ) while( err != Z_STREAM_END && err >= Z_OK && aZStr.avail_in )
...@@ -749,7 +749,7 @@ static void unzipToBuffer( char* pBegin, unsigned int nLen, ...@@ -749,7 +749,7 @@ static void unzipToBuffer( char* pBegin, unsigned int nLen,
{ {
const int nNewAlloc = *pOutLen + buf_increment_size; const int nNewAlloc = *pOutLen + buf_increment_size;
*pOutBuf = static_cast<sal_uInt8*>(rtl_reallocateMemory( *pOutBuf, nNewAlloc )); *pOutBuf = static_cast<sal_uInt8*>(rtl_reallocateMemory( *pOutBuf, nNewAlloc ));
aZStr.next_out = (Bytef*)(*pOutBuf + *pOutLen); aZStr.next_out = reinterpret_cast<Bytef*>(*pOutBuf + *pOutLen);
aZStr.avail_out = buf_increment_size; aZStr.avail_out = buf_increment_size;
*pOutLen = nNewAlloc; *pOutLen = nNewAlloc;
} }
......
...@@ -150,7 +150,7 @@ void PngHelper::endChunk( size_t nStart, OutputBuffer& o_rOutputBuf ) ...@@ -150,7 +150,7 @@ void PngHelper::endChunk( size_t nStart, OutputBuffer& o_rOutputBuf )
set( nDataLen, o_rOutputBuf, nStart ); set( nDataLen, o_rOutputBuf, nStart );
// append chunk crc // append chunk crc
sal_uInt32 nChunkCRC = getCRC( (sal_uInt8*)&o_rOutputBuf[nStart+4], nLen-4 ); sal_uInt32 nChunkCRC = getCRC( reinterpret_cast<sal_uInt8*>(&o_rOutputBuf[nStart+4]), nLen-4 );
append( nChunkCRC, o_rOutputBuf ); append( nChunkCRC, o_rOutputBuf );
} }
......
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