mirror of
https://github.com/sal063/AC6_recomp
synced 2026-05-24 23:22:16 -04:00
28 lines
441 B
C++
28 lines
441 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
|
|
#ifndef XXH_INLINE_ALL
|
|
#define XXH_INLINE_ALL
|
|
#endif
|
|
|
|
#include <xxhash.h>
|
|
|
|
namespace rex {
|
|
|
|
template <typename Key>
|
|
struct IdentityHasher {
|
|
size_t operator()(const Key& key) const {
|
|
return static_cast<size_t>(key);
|
|
}
|
|
};
|
|
|
|
template <typename Key>
|
|
struct XXHasher {
|
|
size_t operator()(const Key& key) const {
|
|
return static_cast<size_t>(XXH3_64bits(&key, sizeof(key)));
|
|
}
|
|
};
|
|
|
|
} // namespace rex
|