Fix GLM_GTX_hash

This commit is contained in:
christophe 2023-12-28 17:37:02 +01:00
parent a40974fb86
commit b269dce26b
2 changed files with 11 additions and 11 deletions

View file

@ -44,7 +44,7 @@
#pragma message("GLM_GTX_hash requires C++11 standard library support")
#endif
#if 0 && GLM_LANG & GLM_LANG_CXX11
#if GLM_LANG & GLM_LANG_CXX11
#define GLM_GTX_hash 1
#include <functional>

View file

@ -68,7 +68,7 @@ namespace std
GLM_FUNC_QUALIFIER size_t hash<glm::tdualquat<T, Q> >::operator()(glm::tdualquat<T, Q> const& q) const GLM_NOEXCEPT
{
size_t seed = 0;
hash<glm::qua<T, Q>> hasher;
hash<glm::qua<T, Q> > hasher;
glm::detail::hash_combine(seed, hasher(q.real));
glm::detail::hash_combine(seed, hasher(q.dual));
return seed;
@ -78,7 +78,7 @@ namespace std
GLM_FUNC_QUALIFIER size_t hash<glm::mat<2, 2, T, Q> >::operator()(glm::mat<2, 2, T, Q> const& m) const GLM_NOEXCEPT
{
size_t seed = 0;
hash<glm::vec<2, T, Q>> hasher;
hash<glm::vec<2, T, Q> > hasher;
glm::detail::hash_combine(seed, hasher(m[0]));
glm::detail::hash_combine(seed, hasher(m[1]));
return seed;
@ -88,7 +88,7 @@ namespace std
GLM_FUNC_QUALIFIER size_t hash<glm::mat<2, 3, T, Q> >::operator()(glm::mat<2, 3, T, Q> const& m) const GLM_NOEXCEPT
{
size_t seed = 0;
hash<glm::vec<3, T, Q>> hasher;
hash<glm::vec<3, T, Q> > hasher;
glm::detail::hash_combine(seed, hasher(m[0]));
glm::detail::hash_combine(seed, hasher(m[1]));
return seed;
@ -98,7 +98,7 @@ namespace std
GLM_FUNC_QUALIFIER size_t hash<glm::mat<2, 4, T, Q> >::operator()(glm::mat<2, 4, T, Q> const& m) const GLM_NOEXCEPT
{
size_t seed = 0;
hash<glm::vec<4, T, Q>> hasher;
hash<glm::vec<4, T, Q> > hasher;
glm::detail::hash_combine(seed, hasher(m[0]));
glm::detail::hash_combine(seed, hasher(m[1]));
return seed;
@ -108,7 +108,7 @@ namespace std
GLM_FUNC_QUALIFIER size_t hash<glm::mat<3, 2, T, Q> >::operator()(glm::mat<3, 2, T, Q> const& m) const GLM_NOEXCEPT
{
size_t seed = 0;
hash<glm::vec<2, T, Q>> hasher;
hash<glm::vec<2, T, Q> > hasher;
glm::detail::hash_combine(seed, hasher(m[0]));
glm::detail::hash_combine(seed, hasher(m[1]));
glm::detail::hash_combine(seed, hasher(m[2]));
@ -119,7 +119,7 @@ namespace std
GLM_FUNC_QUALIFIER size_t hash<glm::mat<3, 3, T, Q> >::operator()(glm::mat<3, 3, T, Q> const& m) const GLM_NOEXCEPT
{
size_t seed = 0;
hash<glm::vec<3, T, Q>> hasher;
hash<glm::vec<3, T, Q> > hasher;
glm::detail::hash_combine(seed, hasher(m[0]));
glm::detail::hash_combine(seed, hasher(m[1]));
glm::detail::hash_combine(seed, hasher(m[2]));
@ -130,7 +130,7 @@ namespace std
GLM_FUNC_QUALIFIER size_t hash<glm::mat<3, 4, T, Q> >::operator()(glm::mat<3, 4, T, Q> const& m) const GLM_NOEXCEPT
{
size_t seed = 0;
hash<glm::vec<4, T, Q>> hasher;
hash<glm::vec<4, T, Q> > hasher;
glm::detail::hash_combine(seed, hasher(m[0]));
glm::detail::hash_combine(seed, hasher(m[1]));
glm::detail::hash_combine(seed, hasher(m[2]));
@ -141,7 +141,7 @@ namespace std
GLM_FUNC_QUALIFIER size_t hash<glm::mat<4, 2, T,Q> >::operator()(glm::mat<4, 2, T,Q> const& m) const GLM_NOEXCEPT
{
size_t seed = 0;
hash<glm::vec<2, T, Q>> hasher;
hash<glm::vec<2, T, Q> > hasher;
glm::detail::hash_combine(seed, hasher(m[0]));
glm::detail::hash_combine(seed, hasher(m[1]));
glm::detail::hash_combine(seed, hasher(m[2]));
@ -153,7 +153,7 @@ namespace std
GLM_FUNC_QUALIFIER size_t hash<glm::mat<4, 3, T,Q> >::operator()(glm::mat<4, 3, T,Q> const& m) const GLM_NOEXCEPT
{
size_t seed = 0;
hash<glm::vec<3, T, Q>> hasher;
hash<glm::vec<3, T, Q> > hasher;
glm::detail::hash_combine(seed, hasher(m[0]));
glm::detail::hash_combine(seed, hasher(m[1]));
glm::detail::hash_combine(seed, hasher(m[2]));
@ -165,7 +165,7 @@ namespace std
GLM_FUNC_QUALIFIER size_t hash<glm::mat<4, 4, T,Q> >::operator()(glm::mat<4, 4, T, Q> const& m) const GLM_NOEXCEPT
{
size_t seed = 0;
hash<glm::vec<4, T, Q>> hasher;
hash<glm::vec<4, T, Q> > hasher;
glm::detail::hash_combine(seed, hasher(m[0]));
glm::detail::hash_combine(seed, hasher(m[1]));
glm::detail::hash_combine(seed, hasher(m[2]));