mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
tagmap: Try a slightly better hashing function [O. Galibert]
This commit is contained in:
parent
c014d27cd6
commit
cc0f95bb74
@ -114,8 +114,8 @@ public:
|
||||
UINT32 hash(const char *string) const
|
||||
{
|
||||
UINT32 result = *string++;
|
||||
for (char c = *string++; c != 0; c = *string++)
|
||||
result = ((result << 5) | (result >> 27)) + c;
|
||||
for (UINT8 c = *string++; c != 0; c = *string++)
|
||||
result = (result*33) ^ c;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user