From dcfc99705f958114e9b28aeb58b8081b58a32a6a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 15 Feb 2012 16:08:46 +0000 Subject: use sal crc32 and skip cast frenzy --- package/source/zipapi/CRC32.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'package') diff --git a/package/source/zipapi/CRC32.cxx b/package/source/zipapi/CRC32.cxx index 5c5dedce8756..274fb58d6184 100644 --- a/package/source/zipapi/CRC32.cxx +++ b/package/source/zipapi/CRC32.cxx @@ -27,14 +27,8 @@ ************************************************************************/ #include -#ifndef _ZLIB_H -#ifdef SYSTEM_ZLIB -#include -#else -#include -#endif -#endif #include +#include #include using namespace com::sun::star::uno; @@ -67,14 +61,14 @@ void SAL_CALL CRC32::updateSegment(const Sequence< sal_Int8 > &b, sal_Int32 len) throw(RuntimeException) { - nCRC = crc32(nCRC, (const unsigned char*)b.getConstArray()+off, len ); + nCRC = rtl_crc32(nCRC, b.getConstArray()+off, len ); } /** Update CRC32 with specified sequence of bytes */ void SAL_CALL CRC32::update(const Sequence< sal_Int8 > &b) throw(RuntimeException) { - nCRC = crc32(nCRC, (const unsigned char*)b.getConstArray(),b.getLength()); + nCRC = rtl_crc32(nCRC, b.getConstArray(),b.getLength()); } sal_Int32 SAL_CALL CRC32::updateStream( Reference < XInputStream > & xStream ) -- cgit