ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/util.h
(Generate patch)

Comparing deliantra/server/include/util.h (file contents):
Revision 1.4 by root, Mon Sep 4 17:16:19 2006 UTC vs.
Revision 1.5 by pippijn, Thu Sep 7 20:03:20 2006 UTC

19struct str_hash 19struct str_hash
20{ 20{
21 std::size_t operator ()(const char *s) const 21 std::size_t operator ()(const char *s) const
22 { 22 {
23 unsigned long hash = 0; 23 unsigned long hash = 0;
24 unsigned int i = 0;
25 24
26 /* use the one-at-a-time hash function, which supposedly is 25 /* use the one-at-a-time hash function, which supposedly is
27 * better than the djb2-like one used by perl5.005, but 26 * better than the djb2-like one used by perl5.005, but
28 * certainly is better then the bug used here before. 27 * certainly is better then the bug used here before.
29 * see http://burtleburtle.net/bob/hash/doobs.html 28 * see http://burtleburtle.net/bob/hash/doobs.html

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines