mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna attempt fix linux
This commit is contained in:
10
BindingMap.h
10
BindingMap.h
@@ -11,6 +11,7 @@
|
|||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "ElunaUtility.h"
|
#include "ElunaUtility.h"
|
||||||
#include "Hooks.h"
|
#include "Hooks.h"
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
@@ -280,11 +281,18 @@ public:
|
|||||||
return std::hash<T>()(t);
|
return std::hash<T>()(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template < typename T, std::enable_if_t<std::is_enum<T>::value> >
|
||||||
|
static inline result_type hash(T const & t)
|
||||||
|
{
|
||||||
|
typedef std::underlying_type<T>::type Enum_type;
|
||||||
|
return std::hash<Enum_type>()(static_cast<Enum_type>(t));
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static inline void _hash_combine(result_type& seed, T const & v)
|
static inline void _hash_combine(result_type& seed, T const & v)
|
||||||
{
|
{
|
||||||
seed ^= std::hash<T>()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
seed ^= hash(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename H, typename... T>
|
template <typename H, typename... T>
|
||||||
|
|||||||
Reference in New Issue
Block a user