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

const_cast: convert some C-style casts and remove some redundant ones

Change-Id: I207f23b084013f9ce2fcf087a7f335bd8a194f50
üst 1a9e2360
...@@ -532,7 +532,7 @@ void PDFOutDev::printPath( GfxPath* pPath ) const ...@@ -532,7 +532,7 @@ void PDFOutDev::printPath( GfxPath* pPath ) const
PDFOutDev::PDFOutDev( PDFDoc* pDoc ) : PDFOutDev::PDFOutDev( PDFDoc* pDoc ) :
m_pDoc( pDoc ), m_pDoc( pDoc ),
m_aFontMap(), m_aFontMap(),
m_pUtf8Map( new UnicodeMap((char*)"UTF-8", gTrue, &mapUTF8) ), m_pUtf8Map( new UnicodeMap("UTF-8", gTrue, &mapUTF8) ),
m_bSkipImages(false) m_bSkipImages(false)
{ {
} }
......
...@@ -114,7 +114,7 @@ namespace pdfi ...@@ -114,7 +114,7 @@ namespace pdfi
bool operator==(const FontAttributes& rFont) const bool operator==(const FontAttributes& rFont) const
{ {
return const_cast<GooString*>(&familyName)->cmp( return familyName.cmp(
const_cast<GooString*>(&rFont.familyName))==0 && const_cast<GooString*>(&rFont.familyName))==0 &&
isEmbedded == rFont.isEmbedded && isEmbedded == rFont.isEmbedded &&
isBold == rFont.isBold && isBold == rFont.isBold &&
......
...@@ -84,7 +84,7 @@ sal_uInt32 PngHelper::deflateBuffer( const Output_t* i_pBuf, size_t i_nLen, Outp ...@@ -84,7 +84,7 @@ sal_uInt32 PngHelper::deflateBuffer( const Output_t* i_pBuf, size_t i_nLen, Outp
aStream.opaque = Z_NULL; aStream.opaque = Z_NULL;
deflateInit( &aStream, Z_BEST_COMPRESSION ); deflateInit( &aStream, Z_BEST_COMPRESSION );
aStream.avail_in = uInt(i_nLen); aStream.avail_in = uInt(i_nLen);
aStream.next_in = (Bytef*)i_pBuf; aStream.next_in = const_cast<Bytef*>(i_pBuf);
sal_uInt8 aOutBuf[ 32768 ]; sal_uInt8 aOutBuf[ 32768 ];
do do
......
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