type cleanup

This commit is contained in:
Glenn Maynard
2004-12-12 00:54:44 +00:00
parent 566e3aa22e
commit 4e1298d6a2
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -499,7 +499,7 @@ CString GetCwd()
* http://www.theorem.com/java/CRC32.java,
* 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 bool initted = false;
@@ -522,6 +522,7 @@ void CRC32( unsigned int &iCRC, const char *pBuffer, size_t iSize )
}
unsigned crc = 0;
const char *pBuffer = (const char *) pVoidBuffer;
for( unsigned i = 0; i < iSize; ++i )
iCRC = (iCRC >> 8) ^ tab[(iCRC ^ pBuffer[i]) & 0xFF];
}
+1 -1
View File
@@ -237,7 +237,7 @@ CString join( const CString &Delimitor, CStringArray::const_iterator begin, CStr
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 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