diff options
author | rtk0c <[email protected]> | 2022-06-30 21:38:53 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-06-30 21:38:53 -0700 |
commit | 7fe47a9d5b1727a61dc724523b530762f6d6ba19 (patch) | |
tree | e95be6e66db504ed06d00b72c579565bab873277 /app/source/Cplt/Utils/Hash.hpp | |
parent | 2cf952088d375ac8b2f45b144462af0953436cff (diff) |
Restructure project
Diffstat (limited to 'app/source/Cplt/Utils/Hash.hpp')
-rw-r--r-- | app/source/Cplt/Utils/Hash.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/source/Cplt/Utils/Hash.hpp b/app/source/Cplt/Utils/Hash.hpp new file mode 100644 index 0000000..cf7713a --- /dev/null +++ b/app/source/Cplt/Utils/Hash.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include <cstddef> +#include <functional> + +namespace HashUtils { + +template <class T> +void Combine(size_t& seed, const T& v) +{ + std::hash<T> hasher; + seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); +} + +} // namespace HashUtils |