diff options
author | HampusM <hampus@hampusmat.com> | 2022-06-02 20:50:28 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:57:00 +0200 |
commit | 7578eb6f79afbb421298088ee53da620eb04037f (patch) | |
tree | 6784011258b6967e75cf8478356c651c1c45938b /src/util/hash.tpp | |
parent | ea5cd08dd67f9bc4351ecebdda9e310a8072ae32 (diff) |
refactor: rename .tpp files to end with _impl.hpp
Diffstat (limited to 'src/util/hash.tpp')
-rw-r--r-- | src/util/hash.tpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/util/hash.tpp b/src/util/hash.tpp deleted file mode 100644 index 146cfa0..0000000 --- a/src/util/hash.tpp +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "hash.hpp" - -#include <cstdint> -#include <functional> - -/** - * Combines the hash 'seed' with the hash of 'value'. - * - * @param seed A hash that will be mutated - * @param value A hashable value - */ -template <typename Value> -void hash_combine(std::size_t &seed, const Value &value) noexcept -{ - constexpr uint32_t shift_left = 6; - constexpr uint32_t shift_right = 2; - - seed ^= std::hash<Value>()(value) + GOLDEN_RATIO + (seed << shift_left) + - (seed >> shift_right); -} |