Moving around some math macros.
This commit is contained in:
@@ -12,8 +12,19 @@
|
||||
|
||||
#include <xenia/common.h>
|
||||
|
||||
namespace xe {
|
||||
|
||||
uint64_t xe_hash64(const void* data, size_t length, uint64_t seed = 0);
|
||||
inline size_t hash_combine(size_t seed) { return seed; }
|
||||
|
||||
template <typename T, typename... Ts>
|
||||
size_t hash_combine(size_t seed, const T& v, const Ts&... vs) {
|
||||
std::hash<T> hasher;
|
||||
seed ^= hasher(v) + 0x9E3779B9 + (seed << 6) + (seed >> 2);
|
||||
return hash_combine(seed, vs...);
|
||||
}
|
||||
|
||||
uint64_t hash64(const void* data, size_t length, uint64_t seed = 0);
|
||||
|
||||
} // namespace xe
|
||||
|
||||
#endif // XENIA_CORE_HASH_H_
|
||||
|
||||
Reference in New Issue
Block a user