Fixed warnings

This commit is contained in:
Christophe Riccio 2018-08-13 20:41:11 +02:00
parent 7489d5d01e
commit 72c3b98e5b
4 changed files with 22 additions and 22 deletions

View File

@ -1,6 +1,3 @@
/// @ref core
/// @file glm/detail/setup.hpp
#ifndef GLM_SETUP_INCLUDED
#include <cassert>
@ -402,7 +399,6 @@
# define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
#else
# define GLM_STATIC_ASSERT(x, message)
# define GLM_STATIC_ASSERT_NULL
#endif//GLM_LANG
///////////////////////////////////////////////////////////////////////////////////

View File

@ -1,10 +1,12 @@
#include <glm/ext/scalar_float_sized.hpp>
GLM_STATIC_ASSERT(sizeof(glm::float32) == 4, "float32 size isn't 4 bytes on this platform");
#if GLM_HAS_STATIC_ASSERT
static_assert(sizeof(glm::float32) == 4, "float32 size isn't 4 bytes on this platform");
#ifndef GLM_FORCE_SINGLE_ONLY
GLM_STATIC_ASSERT(sizeof(glm::float64) == 8, "float64 size isn't 8 bytes on this platform");
#endif//GLM_FORCE_SINGLE_ONLY
# ifndef GLM_FORCE_SINGLE_ONLY
static_assert(sizeof(glm::float64) == 8, "float64 size isn't 8 bytes on this platform");
# endif
#endif
static int test_float_size()
{

View File

@ -1,12 +1,13 @@
#include <glm/ext/scalar_int_sized.hpp>
GLM_STATIC_ASSERT(sizeof(glm::int8) == 1, "int8 size isn't 1 byte on this platform");
GLM_STATIC_ASSERT(sizeof(glm::int16) == 2, "int16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::int32) == 4, "int32 size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::int64) == 8, "int64 size isn't 8 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::int16) == sizeof(short), "signed short size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::int32) == sizeof(int), "signed int size isn't 4 bytes on this platform");
#if GLM_HAS_STATIC_ASSERT
static_assert(sizeof(glm::int8) == 1, "int8 size isn't 1 byte on this platform");
static_assert(sizeof(glm::int16) == 2, "int16 size isn't 2 bytes on this platform");
static_assert(sizeof(glm::int32) == 4, "int32 size isn't 4 bytes on this platform");
static_assert(sizeof(glm::int64) == 8, "int64 size isn't 8 bytes on this platform");
static_assert(sizeof(glm::int16) == sizeof(short), "signed short size isn't 4 bytes on this platform");
static_assert(sizeof(glm::int32) == sizeof(int), "signed int size isn't 4 bytes on this platform");
#endif
static int test_size()
{

View File

@ -1,12 +1,13 @@
#include <glm/ext/scalar_uint_sized.hpp>
GLM_STATIC_ASSERT(sizeof(glm::uint8) == 1, "uint8 size isn't 1 byte on this platform");
GLM_STATIC_ASSERT(sizeof(glm::uint16) == 2, "uint16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::uint32) == 4, "uint32 size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::uint64) == 8, "uint64 size isn't 8 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::uint16) == sizeof(unsigned short), "unsigned short size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::uint32) == sizeof(unsigned int), "unsigned int size isn't 4 bytes on this platform");
#if GLM_HAS_STATIC_ASSERT
static_assert(sizeof(glm::uint8) == 1, "uint8 size isn't 1 byte on this platform");
static_assert(sizeof(glm::uint16) == 2, "uint16 size isn't 2 bytes on this platform");
static_assert(sizeof(glm::uint32) == 4, "uint32 size isn't 4 bytes on this platform");
static_assert(sizeof(glm::uint64) == 8, "uint64 size isn't 8 bytes on this platform");
static_assert(sizeof(glm::uint16) == sizeof(unsigned short), "unsigned short size isn't 4 bytes on this platform");
static_assert(sizeof(glm::uint32) == sizeof(unsigned int), "unsigned int size isn't 4 bytes on this platform");
#endif
static int test_size()
{