From 92a6c207bcb90272b731b87bb692a3fbba990721 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 11 Oct 2015 22:01:02 +0200 Subject: [PATCH] Fixed build on C++98 compiler --- glm/gtc/packing.inl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl index 5e71ef48..0bf43585 100644 --- a/glm/gtc/packing.inl +++ b/glm/gtc/packing.inl @@ -623,8 +623,8 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType packUnorm(vecType const & v) { - static_assert(std::numeric_limits::is_integer, "uintType must be an integer type"); - static_assert(std::numeric_limits::is_iec559, "floatType must be a floating point type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "uintType must be an integer type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "floatType must be a floating point type"); return vecType(round(clamp(v, static_cast(0), static_cast(1)) * static_cast(std::numeric_limits::max()))); } @@ -632,8 +632,8 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType unpackUnorm(vecType const & v) { - static_assert(std::numeric_limits::is_integer, "uintType must be an integer type"); - static_assert(std::numeric_limits::is_iec559, "floatType must be a floating point type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "uintType must be an integer type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "floatType must be a floating point type"); return vecType(v) * (static_cast(1) / static_cast(std::numeric_limits::max())); } @@ -641,8 +641,8 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType packSnorm(vecType const & v) { - static_assert(std::numeric_limits::is_integer, "uintType must be an integer type"); - static_assert(std::numeric_limits::is_iec559, "floatType must be a floating point type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "uintType must be an integer type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "floatType must be a floating point type"); return vecType(round(clamp(v , static_cast(-1), static_cast(1)) * static_cast(std::numeric_limits::max()))); } @@ -650,8 +650,8 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType unpackSnorm(vecType const & v) { - static_assert(std::numeric_limits::is_integer, "uintType must be an integer type"); - static_assert(std::numeric_limits::is_iec559, "floatType must be a floating point type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "uintType must be an integer type"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "floatType must be a floating point type"); return clamp(vecType(v) * (static_cast(1) / static_cast(std::numeric_limits::max())), static_cast(-1), static_cast(1)); }