From 4bc87efa09b6bb45bd1fbb9029af59f4cdf80b0b Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Thu, 17 Aug 2017 15:12:31 +0200 Subject: [PATCH] Fixed build on GCC 7.1 --- glm/detail/func_common.inl | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index bdcb4cfe..f4167d4b 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -648,11 +648,14 @@ namespace detail # endif template - GLM_FUNC_QUALIFIER vec isnan(vec const& x) + GLM_FUNC_QUALIFIER vec isnan(vec const& v) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isnan' only accept floating-point inputs"); - return detail::functor1::call(glm::isnan, x); + vec Result; + for (length_t l = 0; l < v.length(); ++l) + Result[l] = glm::isnan(v[l]); + return Result; } # if GLM_HAS_CXX11_STL @@ -687,11 +690,14 @@ namespace detail # endif template - GLM_FUNC_QUALIFIER vec isinf(vec const& x) + GLM_FUNC_QUALIFIER vec isinf(vec const& v) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isnan' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isinf' only accept floating-point inputs"); - return detail::functor1::call(glm::isinf, x); + vec Result; + for (length_t l = 0; l < v.length(); ++l) + Result[l] = glm::isinf(v[l]); + return Result; } GLM_FUNC_QUALIFIER int floatBitsToInt(float const& v)