mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 07:35:47 -04:00
D3D11: Add a shader bytecode cache class
This commit is contained in:
10
src/common/hash_combine.h
Normal file
10
src/common/hash_combine.h
Normal file
@ -0,0 +1,10 @@
|
||||
// https://stackoverflow.com/questions/2590677/how-do-i-combine-hash-values-in-c0x
|
||||
#pragma once
|
||||
#include <functional>
|
||||
|
||||
template<typename T, typename... Rest>
|
||||
void hash_combine(std::size_t& seed, const T& v, const Rest&... rest)
|
||||
{
|
||||
seed ^= std::hash<T>{}(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||
(hash_combine(seed, rest), ...);
|
||||
}
|
Reference in New Issue
Block a user