From fe6fb29107f790cfa81c169b3cf287d696cb825a Mon Sep 17 00:00:00 2001 From: Oliver Whyte Date: Fri, 5 Apr 2019 11:27:00 -0700 Subject: [PATCH] Add const to quaternion conversion operators --- glm/detail/type_quat.hpp | 4 ++-- glm/detail/type_quat.inl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/glm/detail/type_quat.hpp b/glm/detail/type_quat.hpp index b49c2534..28eb41bb 100644 --- a/glm/detail/type_quat.hpp +++ b/glm/detail/type_quat.hpp @@ -101,8 +101,8 @@ namespace glm /// Explicit conversion operators # if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS - GLM_FUNC_DECL explicit operator mat<3, 3, T, Q>(); - GLM_FUNC_DECL explicit operator mat<4, 4, T, Q>(); + GLM_FUNC_DECL explicit operator mat<3, 3, T, Q>() const; + GLM_FUNC_DECL explicit operator mat<4, 4, T, Q>() const; # endif /// Create a quaternion from two normalized axis diff --git a/glm/detail/type_quat.inl b/glm/detail/type_quat.inl index d9f63c67..ac73af74 100644 --- a/glm/detail/type_quat.inl +++ b/glm/detail/type_quat.inl @@ -197,13 +197,13 @@ namespace detail # if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS template - GLM_FUNC_QUALIFIER qua::operator mat<3, 3, T, Q>() + GLM_FUNC_QUALIFIER qua::operator mat<3, 3, T, Q>() const { return mat3_cast(*this); } template - GLM_FUNC_QUALIFIER qua::operator mat<4, 4, T, Q>() + GLM_FUNC_QUALIFIER qua::operator mat<4, 4, T, Q>() const { return mat4_cast(*this); }