]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/container/hashfunc.h
added string-pooling for shader variable names and entity keys
[xonotic/netradiant.git] / libs / container / hashfunc.h
index 03e5e26b2e24b5f0908283bf3a24e78f8b05ec46..a4ec5fee432bd20f6176afb48ff7fe49e1def766 100644 (file)
@@ -320,6 +320,15 @@ inline hash_t string_hash_nocase(const char* string, hash_t previous = 0)
   return hash_ub1_nocase(reinterpret_cast<const ub1*>(string), string_length(string), previous);
 }
 
+struct RawStringHash
+{
+  typedef hash_t hash_type;
+  hash_type operator()(const char* string) const
+  {
+    return string_hash(string);
+  }
+};
+
 struct HashString
 {
   typedef hash_t hash_type;