type cleanup
This commit is contained in:
@@ -499,7 +499,7 @@ CString GetCwd()
|
|||||||
* http://www.theorem.com/java/CRC32.java,
|
* http://www.theorem.com/java/CRC32.java,
|
||||||
* http://www.faqs.org/rfcs/rfc1952.html
|
* http://www.faqs.org/rfcs/rfc1952.html
|
||||||
*/
|
*/
|
||||||
void CRC32( unsigned int &iCRC, const char *pBuffer, size_t iSize )
|
void CRC32( unsigned int &iCRC, const void *pVoidBuffer, size_t iSize )
|
||||||
{
|
{
|
||||||
static unsigned tab[256];
|
static unsigned tab[256];
|
||||||
static bool initted = false;
|
static bool initted = false;
|
||||||
@@ -522,6 +522,7 @@ void CRC32( unsigned int &iCRC, const char *pBuffer, size_t iSize )
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned crc = 0;
|
unsigned crc = 0;
|
||||||
|
const char *pBuffer = (const char *) pVoidBuffer;
|
||||||
for( unsigned i = 0; i < iSize; ++i )
|
for( unsigned i = 0; i < iSize; ++i )
|
||||||
iCRC = (iCRC >> 8) ^ tab[(iCRC ^ pBuffer[i]) & 0xFF];
|
iCRC = (iCRC >> 8) ^ tab[(iCRC ^ pBuffer[i]) & 0xFF];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ CString join( const CString &Delimitor, CStringArray::const_iterator begin, CStr
|
|||||||
|
|
||||||
CString GetCwd();
|
CString GetCwd();
|
||||||
|
|
||||||
void CRC32( unsigned int &iCRC, const char *pBuffer, size_t iSize );
|
void CRC32( unsigned int &iCRC, const void *pBuffer, size_t iSize );
|
||||||
unsigned int GetHashForString( const CString &s );
|
unsigned int GetHashForString( const CString &s );
|
||||||
unsigned int GetHashForFile( const CString &sPath );
|
unsigned int GetHashForFile( const CString &sPath );
|
||||||
unsigned int GetHashForDirectory( const CString &sDir ); // a hash value that remains the same as long as nothing in the directory has changed
|
unsigned int GetHashForDirectory( const CString &sDir ); // a hash value that remains the same as long as nothing in the directory has changed
|
||||||
|
|||||||
Reference in New Issue
Block a user