1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 04:26:03 +08:00

Remove register from generichash (#309)

This commit is contained in:
Pavel Djundik
2025-05-17 23:04:11 +03:00
committed by GitHub
parent 306216200c
commit 8be70e15be

View File

@ -125,7 +125,7 @@ unsigned FASTCALL HashStringConventional( const char *pszKey )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
unsigned FASTCALL HashInt( const int n ) unsigned FASTCALL HashInt( const int n )
{ {
register unsigned even, odd; unsigned even, odd;
even = g_nRandomValues[n & 0xff]; even = g_nRandomValues[n & 0xff];
odd = g_nRandomValues[((n >> 8) & 0xff)]; odd = g_nRandomValues[((n >> 8) & 0xff)];
@ -142,8 +142,8 @@ unsigned FASTCALL HashInt( const int n )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
unsigned FASTCALL Hash4( const void *pKey ) unsigned FASTCALL Hash4( const void *pKey )
{ {
register const uint32 * p = (const uint32 *) pKey; const uint32 * p = (const uint32 *) pKey;
register unsigned even, unsigned even,
odd, odd,
n; n;
n = *p; n = *p;
@ -164,8 +164,8 @@ unsigned FASTCALL Hash4( const void *pKey )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
unsigned FASTCALL Hash8( const void *pKey ) unsigned FASTCALL Hash8( const void *pKey )
{ {
register const uint32 * p = (const uint32 *) pKey; const uint32 * p = (const uint32 *) pKey;
register unsigned even, unsigned even,
odd, odd,
n; n;
n = *p; n = *p;
@ -192,8 +192,8 @@ unsigned FASTCALL Hash8( const void *pKey )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
unsigned FASTCALL Hash12( const void *pKey ) unsigned FASTCALL Hash12( const void *pKey )
{ {
register const uint32 * p = (const uint32 *) pKey; const uint32 * p = (const uint32 *) pKey;
register unsigned even, unsigned even,
odd, odd,
n; n;
n = *p; n = *p;
@ -226,8 +226,8 @@ unsigned FASTCALL Hash12( const void *pKey )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
unsigned FASTCALL Hash16( const void *pKey ) unsigned FASTCALL Hash16( const void *pKey )
{ {
register const uint32 * p = (const uint32 *) pKey; const uint32 * p = (const uint32 *) pKey;
register unsigned even, unsigned even,
odd, odd,
n; n;
n = *p; n = *p;