]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - hash.c
For now I'll just disable this
[xonotic/gmqcc.git] / hash.c
diff --git a/hash.c b/hash.c
index bc65b7f6821b2e33f0cd6434d2cef69dbb4e1da9..46edc743b26cbeab70ff4ebdd06f7b29793244df 100644 (file)
--- a/hash.c
+++ b/hash.c
@@ -22,6 +22,7 @@
  */
 #include "gmqcc.h"
 #include <limits.h>
+#include <string.h>
 
 #if defined(_MSC_VER)
 #   define HASH_ROTL32(X, Y) _rotl((X), (Y))
@@ -224,6 +225,7 @@ static GMQCC_FORCEINLINE uint32_t hash_murmur(const void *GMQCC_RESTRICT key, si
 }
 
 size_t hash(const char *key) {
+#if 0
     const char   *s = key;
     const char   *a = s;
     const size_t *w;
@@ -236,6 +238,9 @@ size_t hash(const char *key) {
     for (s = (const char *)w; *s; s++);
 
     return hash_murmur((const void *)key, s-a);
+#else
+    return hash_murmur((const void *)key, strlen(key));
+#endif
 }
 
 #undef HASH_ROTL32