hash: disable conflicting function names

clashes with the util::hash namespace. they should be moved into this
namespace.
This commit is contained in:
Danny Robson 2015-06-02 20:32:03 +10:00
parent 7311acaef6
commit bc5888bfcf

View File

@ -31,16 +31,16 @@ namespace util {
uint64_t fnv1a64 (const void *, size_t);
// General hashes for when you really just don't care about implementation
inline uint32_t hash (uint32_t key) { return wang32 (key); }
inline int32_t hash ( int32_t key) { return (int32_t) hash ((uint32_t)key); }
//inline uint32_t hash (uint32_t key) { return wang32 (key); }
//inline int32_t hash ( int32_t key) { return (int32_t) hash ((uint32_t)key); }
inline uint64_t hash (uint64_t key) { return wang64 (key); }
inline int64_t hash ( int64_t key) { return (int64_t) hash ((uint64_t)key); }
//inline uint64_t hash (uint64_t key) { return wang64 (key); }
//inline int64_t hash ( int64_t key) { return (int64_t) hash ((uint64_t)key); }
inline uintptr_t hash (const void *key) {
return sizeof (uintptr_t) == 32 ? wang32 (reinterpret_cast<uintptr_t> (key)) :
wang64 (reinterpret_cast<uintptr_t> (key));
}
//inline uintptr_t hash (const void *key) {
// return sizeof (uintptr_t) == 32 ? wang32 (reinterpret_cast<uintptr_t> (key)) :
// wang64 (reinterpret_cast<uintptr_t> (key));
//}
}