Fixed GCC static assert

This commit is contained in:
Christophe Riccio 2010-12-14 23:42:44 +00:00
parent 4c28b314f9
commit 35aaedb95c

View File

@ -110,6 +110,10 @@ namespace glm
# define GLM_RESTRICT __restrict
# define GLM_ALIGN(x) __declspec(align(x))
//# define aligned(x) __declspec(align(x)) struct
#elif(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_GCC))
# define GLM_DEPRECATED deprecated
# define GLM_RESTRICT
# define GLM_ALIGN(x) __attribute__(aligned(x))
#else
# define GLM_DEPRECATED
# define GLM_RESTRICT
@ -118,20 +122,18 @@ namespace glm
////////////////////
// check type sizes
#ifndef GLM_STATIC_ASSERT_NULL
GLM_STATIC_ASSERT(sizeof(glm::detail::int8)==1, "int8 size isn't 1 byte on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::int16)==2, "int16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::int32)==4, "int32 size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::int64)==8, "int64 size isn't 8 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::int8) == 1, "int8 size isn't 1 byte on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::int16) == 2, "int16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::int32) == 4, "int32 size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::int64) == 8, "int64 size isn't 8 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint8)==1, "uint8 size isn't 1 byte on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint16)==2, "uint16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint32)==4, "uint32 size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint64)==8, "uint64 size isn't 8 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint8) == 1, "uint8 size isn't 1 byte on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint16) == 2, "uint16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint32) == 4, "uint32 size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint64) == 8, "uint64 size isn't 8 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::float16)==2, "float16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::float32)==4, "float32 size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::float64)==8, "float64 size isn't 8 bytes on this platform");
#endif//GLM_STATIC_ASSERT_NULL
GLM_STATIC_ASSERT(sizeof(glm::detail::float16) == 2, "float16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::float32) == 4, "float32 size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform");
#endif //glm_glm