Browse Source

Added helper func to murmur hash class.

bkaradzic 13 years ago
parent
commit
b6519e558f
1 changed files with 6 additions and 0 deletions
  1. 6 0
      include/bx/hash.h

+ 6 - 0
include/bx/hash.h

@@ -48,6 +48,12 @@ namespace bx
 			mixTail(data, _len);
 			mixTail(data, _len);
 		}
 		}
 
 
+		template<typename Ty>
+		void add(Ty _value)
+		{
+			add(&_value, sizeof(Ty) );
+		}
+
 		uint32_t end()
 		uint32_t end()
 		{
 		{
 			mmix(m_hash, m_tail);
 			mmix(m_hash, m_tail);