Upgrade codebase to C++ 20 + fix warnings + update submodules (#6115)
This commit is contained in:
parent
90b418fd1a
commit
cbd5d1c15c
67 changed files with 6837 additions and 7475 deletions
|
@ -33,6 +33,14 @@ static inline u64 ComputeStructHash64(const T& data) noexcept {
|
|||
return ComputeHash64(&data, sizeof(data));
|
||||
}
|
||||
|
||||
/**
|
||||
* Combines the seed parameter with the provided hash, producing a new unique hash
|
||||
* Implementation from: http://boost.sourceforge.net/doc/html/boost/hash_combine.html
|
||||
*/
|
||||
inline u64 HashCombine(std::size_t& seed, const u64 hash) {
|
||||
return seed ^= hash + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||
}
|
||||
|
||||
/// A helper template that ensures the padding in a struct is initialized by memsetting to 0.
|
||||
template <typename T>
|
||||
struct HashableStruct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue