diff options
author | Marius Kintel <marius@kintel.net> | 2011-11-21 20:00:44 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-11-21 20:00:44 (GMT) |
commit | 077c144c867d07eced8b50e769089dcbfbfc96b9 (patch) | |
tree | f9fe35cb249180e5df6a543c72ed072a639bd3a7 /src/qhash.cc | |
parent | 00cff177efaab72a58045cb4593ea9a3293853d7 (diff) | |
parent | cabff81c70f7d9083c47f5be8b5bc071168e6b35 (diff) |
Merge branch 'cache'
Diffstat (limited to 'src/qhash.cc')
-rw-r--r-- | src/qhash.cc | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/qhash.cc b/src/qhash.cc deleted file mode 100644 index cec9adf..0000000 --- a/src/qhash.cc +++ /dev/null @@ -1,19 +0,0 @@ -#include "myqhash.h" - -static uint hash(const uchar *p, int n) -{ - uint h = 0; - uint g; - - while (n--) { - h = (h << 4) + *p++; - if ((g = (h & 0xf0000000)) != 0) - h ^= g >> 23; - h &= ~g; - } - return h; -} - -uint qHash(const std::string &str) { - return hash(reinterpret_cast<const uchar *>(str.c_str()), str.length()); -} |