From e7bae9891a84c967d01f32018f154d36121a9908 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 31 Aug 2015 22:50:24 +0200 Subject: [PATCH] Improved coding style consistency --- glm/gtx/hash.hpp | 58 +++++++++++++++++++++--------------------- glm/gtx/hash.inl | 65 +++++++++++++++++++----------------------------- 2 files changed, 54 insertions(+), 69 deletions(-) diff --git a/glm/gtx/hash.hpp b/glm/gtx/hash.hpp index 1d9e5572..02030987 100644 --- a/glm/gtx/hash.hpp +++ b/glm/gtx/hash.hpp @@ -70,93 +70,93 @@ namespace std { template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tvec1 &v) const; + GLM_FUNC_DECL size_t operator()(glm::tvec1 const & v) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tvec2 &v) const; + GLM_FUNC_DECL size_t operator()(glm::tvec2 const & v) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tvec3 &v) const; + GLM_FUNC_DECL size_t operator()(glm::tvec3 const & v) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tvec4 &v) const; + GLM_FUNC_DECL size_t operator()(glm::tvec4 const & v) const; }; template struct hash> { - GLM_FUNC_DECL size_t operator()(const glm::tquat &q) const; + GLM_FUNC_DECL size_t operator()(glm::tquat const & q) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tdualquat &q) const; + GLM_FUNC_DECL size_t operator()(glm::tdualquat const & q) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tmat2x2 &m) const; + GLM_FUNC_DECL size_t operator()(glm::tmat2x2 const & m) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tmat2x3 &m) const; + GLM_FUNC_DECL size_t operator()(glm::tmat2x3 const & m) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tmat2x4 &m) const; + GLM_FUNC_DECL size_t operator()(glm::tmat2x4 const & m) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tmat3x2 &m) const; + GLM_FUNC_DECL size_t operator()(glm::tmat3x2 const & m) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tmat3x3 &m) const; + GLM_FUNC_DECL size_t operator()(glm::tmat3x3 const & m) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tmat3x4 &m) const; + GLM_FUNC_DECL size_t operator()(glm::tmat3x4 const & m) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tmat4x2 &m) const; + GLM_FUNC_DECL size_t operator()(glm::tmat4x2 const & m) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tmat4x3 &m) const; + GLM_FUNC_DECL size_t operator()(glm::tmat4x3 const & m) const; }; template - struct hash> + struct hash > { - GLM_FUNC_DECL size_t operator()(const glm::tmat4x4 &m) const; + GLM_FUNC_DECL size_t operator()(glm::tmat4x4 const & m) const; }; } // namespace std diff --git a/glm/gtx/hash.inl b/glm/gtx/hash.inl index bba2c1ed..8aa299e1 100644 --- a/glm/gtx/hash.inl +++ b/glm/gtx/hash.inl @@ -52,16 +52,14 @@ namespace detail namespace std { template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tvec1 &v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tvec1 const & v) const { hash hasher; return hasher(v.x); } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tvec2 &v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tvec2 const & v) const { size_t seed = 0; hash hasher; @@ -71,8 +69,7 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tvec3 &v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tvec3 const & v) const { size_t seed = 0; hash hasher; @@ -83,8 +80,7 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tvec4 &v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tvec4 const & v) const { size_t seed = 0; hash hasher; @@ -96,8 +92,7 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tquat &q) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tquat const & q) const { size_t seed = 0; hash hasher; @@ -109,55 +104,50 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tdualquat &q) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tdualquat const & q) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(q.real)); glm::detail::hash_combine(seed, hasher(q.dual)); return seed; } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tmat2x2 &m) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat2x2 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); return seed; } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tmat2x3 &m) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat2x3 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); return seed; } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tmat2x4 &m) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat2x4 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); return seed; } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tmat3x2 &m) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat3x2 const & m) const { size_t seed = 0; - hash> hasher; + hash> 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,11 +155,10 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tmat3x3 &m) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat3x3 const & m) const { size_t seed = 0; - hash> hasher; + hash> 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])); @@ -177,11 +166,10 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tmat3x4 &m) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat3x4 const & m) const { size_t seed = 0; - hash> hasher; + hash> 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])); @@ -189,11 +177,10 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tmat4x2 &m) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat4x2 const & m) const { size_t seed = 0; - hash> hasher; + hash> 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])); @@ -202,11 +189,10 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tmat4x3 &m) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat4x3 const & m) const { size_t seed = 0; - hash> hasher; + hash> 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])); @@ -215,11 +201,10 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t - hash>::operator()(const glm::tmat4x4 &m) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat4x4 const & m) const { size_t seed = 0; - hash> hasher; + hash> 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]));