Skip to content

Commit

Permalink
Merge pull request #890 from oliver-om/qua_conversion_const
Browse files Browse the repository at this point in the history
Add const to quaternion conversion operators #890
  • Loading branch information
Groovounet authored Apr 22, 2019
2 parents 9f34f04 + fe6fb29 commit d5760d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions glm/detail/type_quat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions glm/detail/type_quat.inl
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ namespace detail

# if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER qua<T, Q>::operator mat<3, 3, T, Q>()
GLM_FUNC_QUALIFIER qua<T, Q>::operator mat<3, 3, T, Q>() const
{
return mat3_cast(*this);
}

template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER qua<T, Q>::operator mat<4, 4, T, Q>()
GLM_FUNC_QUALIFIER qua<T, Q>::operator mat<4, 4, T, Q>() const
{
return mat4_cast(*this);
}
Expand Down

0 comments on commit d5760d9

Please sign in to comment.