summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/tagmap.h
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2013-01-03 14:22:27 +0000
committer Olivier Galibert <galibert@pobox.com>2013-01-03 14:22:27 +0000
commitcc0f95bb7409e4669fa81cf1d44b10560cb86cc4 (patch)
treeffdaa3b4561580b9af802f548104ba17288e0735 /src/lib/util/tagmap.h
parentc014d27cd6d07e6911b04463dc7f6b6a71edbad2 (diff)
tagmap: Try a slightly better hashing function [O. Galibert]
Diffstat (limited to 'src/lib/util/tagmap.h')
-rw-r--r--src/lib/util/tagmap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/util/tagmap.h b/src/lib/util/tagmap.h
index 63855b30e07..23fd72a5369 100644
--- a/src/lib/util/tagmap.h
+++ b/src/lib/util/tagmap.h
@@ -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;
}