diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-15 12:23:20 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-15 13:32:15 +0200 |
commit | 238ce4af682d1eb52ff759b1887b5962e6ad8e9b (patch) | |
tree | 0b59d5a1797e308b50b153665c24b2be525c0cee /package/source | |
parent | 897c8af7948aae8f3e3014f9f23846ef1ca5c6cd (diff) |
remove unnecessary casts
leftovers from conversion of SvStream operator>> to Write methods
Change-Id: Id1d1e60ae42afb689910845a3c6ec75e3388fb56
Diffstat (limited to 'package/source')
-rw-r--r-- | package/source/zipapi/ZipOutputStream.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx index 5c49b1bfc6b7..518058ec1de3 100644 --- a/package/source/zipapi/ZipOutputStream.cxx +++ b/package/source/zipapi/ZipOutputStream.cxx @@ -142,13 +142,13 @@ void ZipOutputStream::writeEND(sal_uInt32 nOffset, sal_uInt32 nLength) throw(IOException, RuntimeException) { m_aChucker.WriteInt32( ENDSIG ); - m_aChucker.WriteInt16( static_cast < sal_Int16 > ( 0 ) ); - m_aChucker.WriteInt16( static_cast < sal_Int16 > ( 0 ) ); - m_aChucker.WriteInt16( static_cast < sal_Int16 > ( m_aZipList.size() ) ); - m_aChucker.WriteInt16( static_cast < sal_Int16 > ( m_aZipList.size() ) ); + m_aChucker.WriteInt16( 0 ); + m_aChucker.WriteInt16( 0 ); + m_aChucker.WriteInt16( m_aZipList.size() ); + m_aChucker.WriteInt16( m_aZipList.size() ); m_aChucker.WriteUInt32( nLength ); m_aChucker.WriteUInt32( nOffset ); - m_aChucker.WriteInt16( static_cast < sal_Int16 > ( 0 ) ); + m_aChucker.WriteInt16( 0 ); } static sal_uInt32 getTruncated( sal_Int64 nNum, bool *pIsTruncated ) @@ -178,16 +178,16 @@ void ZipOutputStream::writeCEN( const ZipEntry &rEntry ) m_aChucker.WriteInt16( rEntry.nMethod ); bool bWrite64Header = false; - m_aChucker.WriteUInt32( static_cast < sal_uInt32> ( rEntry.nTime ) ); - m_aChucker.WriteUInt32( static_cast < sal_uInt32> ( rEntry.nCrc ) ); + m_aChucker.WriteUInt32( rEntry.nTime ); + m_aChucker.WriteUInt32( rEntry.nCrc ); m_aChucker.WriteUInt32( getTruncated( rEntry.nCompressedSize, &bWrite64Header ) ); m_aChucker.WriteUInt32( getTruncated( rEntry.nSize, &bWrite64Header ) ); m_aChucker.WriteInt16( nNameLength ); - m_aChucker.WriteInt16( static_cast < sal_Int16> (0) ); - m_aChucker.WriteInt16( static_cast < sal_Int16> (0) ); - m_aChucker.WriteInt16( static_cast < sal_Int16> (0) ); - m_aChucker.WriteInt16( static_cast < sal_Int16> (0) ); - m_aChucker.WriteInt32( static_cast < sal_Int32> (0) ); + m_aChucker.WriteInt16( 0 ); + m_aChucker.WriteInt16( 0 ); + m_aChucker.WriteInt16( 0 ); + m_aChucker.WriteInt16( 0 ); + m_aChucker.WriteInt32( 0 ); m_aChucker.WriteUInt32( getTruncated( rEntry.nOffset, &bWrite64Header ) ); if( bWrite64Header ) @@ -208,7 +208,7 @@ void ZipOutputStream::writeEXT( const ZipEntry &rEntry ) bool bWrite64Header = false; m_aChucker.WriteInt32( EXTSIG ); - m_aChucker.WriteUInt32( static_cast < sal_uInt32> ( rEntry.nCrc ) ); + m_aChucker.WriteUInt32( rEntry.nCrc ); m_aChucker.WriteUInt32( getTruncated( rEntry.nCompressedSize, &bWrite64Header ) ); m_aChucker.WriteUInt32( getTruncated( rEntry.nSize, &bWrite64Header ) ); @@ -241,27 +241,27 @@ void ZipOutputStream::writeLOC( ZipEntry *pEntry, bool bEncrypt ) m_aChucker.WriteInt16( rEntry.nFlag ); // If it's an encrypted entry, we pretend its stored plain text if (bEncrypt) - m_aChucker.WriteInt16( static_cast < sal_Int16 > ( STORED ) ); + m_aChucker.WriteInt16( STORED ); else m_aChucker.WriteInt16( rEntry.nMethod ); bool bWrite64Header = false; - m_aChucker.WriteUInt32( static_cast < sal_uInt32 > (rEntry.nTime) ); + m_aChucker.WriteUInt32( rEntry.nTime ); if ((rEntry.nFlag & 8) == 8 ) { - m_aChucker.WriteInt32( static_cast < sal_Int32 > (0) ); - m_aChucker.WriteInt32( static_cast < sal_Int32 > (0) ); - m_aChucker.WriteInt32( static_cast < sal_Int32 > (0) ); + m_aChucker.WriteInt32( 0 ); + m_aChucker.WriteInt32( 0 ); + m_aChucker.WriteInt32( 0 ); } else { - m_aChucker.WriteUInt32( static_cast < sal_uInt32 > (rEntry.nCrc) ); + m_aChucker.WriteUInt32( rEntry.nCrc ); m_aChucker.WriteUInt32( getTruncated( rEntry.nCompressedSize, &bWrite64Header ) ); m_aChucker.WriteUInt32( getTruncated( rEntry.nSize, &bWrite64Header ) ); } m_aChucker.WriteInt16( nNameLength ); - m_aChucker.WriteInt16( static_cast < sal_Int16 > (0) ); + m_aChucker.WriteInt16( 0 ); if( bWrite64Header ) { |