From ca0b7a9929c9b8ce28513613340ebde5a5f60177 Mon Sep 17 00:00:00 2001 From: Aaron Date: Tue, 13 Sep 2016 00:36:43 -0700 Subject: [PATCH] Merged graft commit --- glm/detail/type_vec.hpp | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/glm/detail/type_vec.hpp b/glm/detail/type_vec.hpp index 23e463e7..af8ed14a 100644 --- a/glm/detail/type_vec.hpp +++ b/glm/detail/type_vec.hpp @@ -9,15 +9,6 @@ namespace glm{ namespace detail { - template struct aligned {}; - template<> GLM_ALIGNED_STRUCT(1) aligned<1>{}; - template<> GLM_ALIGNED_STRUCT(2) aligned<2>{}; - template<> GLM_ALIGNED_STRUCT(4) aligned<4>{}; - template<> GLM_ALIGNED_STRUCT(8) aligned<8>{}; - template<> GLM_ALIGNED_STRUCT(16) aligned<16>{}; - template<> GLM_ALIGNED_STRUCT(32) aligned<32>{}; - template<> GLM_ALIGNED_STRUCT(64) aligned<64>{}; - template struct storage { @@ -26,15 +17,22 @@ namespace detail } type; }; - template - struct storage - { - struct type : aligned - { - uint8 data[size]; + #define GLM_ALIGNED_STORAGE_TYPE_STRUCT(x) \ + template \ + struct storage { \ + GLM_ALIGNED_STRUCT(x) type { \ + uint8_t data[x]; \ + }; \ }; - }; + GLM_ALIGNED_STORAGE_TYPE_STRUCT(1) + GLM_ALIGNED_STORAGE_TYPE_STRUCT(2) + GLM_ALIGNED_STORAGE_TYPE_STRUCT(4) + GLM_ALIGNED_STORAGE_TYPE_STRUCT(8) + GLM_ALIGNED_STORAGE_TYPE_STRUCT(16) + GLM_ALIGNED_STORAGE_TYPE_STRUCT(32) + GLM_ALIGNED_STORAGE_TYPE_STRUCT(64) + # if GLM_ARCH & GLM_ARCH_SSE2_BIT template <> struct storage