tagging release
[dasher.git] / Src / Common / Hash.h
blobd3b79ba7a4cbc25b1cf9df231c3146fe5748e86f
1 // Hash.h
2 //
3 // Copyright (c) 2005 David Ward
5 #ifndef __Common_Hash_h__
6 #define __Common_Hash_h__
8 // String hash function
10 inline size_t hash_string(const char *s) {
11 register size_t i;
12 for(i = 0; *s; s++) {
13 i *= 16777619;
14 i ^= *s;
16 return i;
20 #endif