1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00
OpenMW/components/misc/hash.hpp

15 lines
309 B
C++
Raw Normal View History

#ifndef MISC_HASH_H
#define MISC_HASH_H
namespace Misc
{
/// Implemented similar to the boost::hash_combine
template <class T>
inline void hashCombine(std::size_t& seed, const T& v)
{
std::hash<T> hasher;
seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);
}
}
#endif