From 8ffe06564e21123b8e3260d448f584f7ba9114f1 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Sun, 28 Jan 2018 19:45:22 +0200 Subject: [PATCH] Fix infinite recursion on some machines https://www.getmangos.eu/bug-tracker/cross-core/eluna/recursive-on-all-paths-will-cause-stack-overflow-r1508/ --- BindingMap.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BindingMap.h b/BindingMap.h index d406c81..1e5b281 100644 --- a/BindingMap.h +++ b/BindingMap.h @@ -266,11 +266,11 @@ class hash_helper public: typedef std::size_t result_type; - template - static inline result_type hash(T const &... t) + template + static inline result_type hash(T1 const & t1, T2 const & t2, T const &... t) { result_type seed = 0; - _hash_combine(seed, t...); + _hash_combine(seed, t1, t2, t...); return seed; } @@ -294,11 +294,11 @@ private: seed ^= hash(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); } - template - static inline void _hash_combine(result_type& seed, H const & h, T const &... t) + template + static inline void _hash_combine(result_type& seed, H const & h, T1 const & t1, T const &... t) { _hash_combine(seed, h); - _hash_combine(seed, t...); + _hash_combine(seed, t1, t...); } };