mirror of
https://github.com/g-truc/glm.git
synced 2024-11-14 14:04:36 +00:00
- Added constexpr for *vec*, *mat*, *quat* and *dual_quat* types #493
This commit is contained in:
parent
33bc27ddc4
commit
d52766297d
@ -723,11 +723,15 @@
|
|||||||
# define GLM_DEFAULT_CTOR
|
# define GLM_DEFAULT_CTOR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GLM_HAS_CONSTEXPR
|
#if GLM_HAS_CONSTEXPR_PARTIAL
|
||||||
# define GLM_CONSTEXPR constexpr
|
# define GLM_CONSTEXPR constexpr
|
||||||
# define GLM_RELAXED_CONSTEXPR constexpr
|
|
||||||
#else
|
#else
|
||||||
# define GLM_CONSTEXPR
|
# define GLM_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if GLM_HAS_CONSTEXPR
|
||||||
|
# define GLM_RELAXED_CONSTEXPR constexpr
|
||||||
|
#else
|
||||||
# define GLM_RELAXED_CONSTEXPR const
|
# define GLM_RELAXED_CONSTEXPR const
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ namespace glm
|
|||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
|
GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat4x3(ctor);
|
GLM_FUNC_DECL GLM_CONSTEXPR explicit tmat4x3(ctor);
|
||||||
GLM_FUNC_DECL explicit tmat4x3(T const & x);
|
GLM_FUNC_DECL explicit tmat4x3(T const & x);
|
||||||
GLM_FUNC_DECL tmat4x3(
|
GLM_FUNC_DECL tmat4x3(
|
||||||
T const & x0, T const & y0, T const & z0,
|
T const & x0, T const & y0, T const & z0,
|
||||||
|
@ -75,7 +75,7 @@ namespace detail
|
|||||||
|
|
||||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat()
|
||||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||||
: x(0), y(0), z(0), w(1)
|
: x(0), y(0), z(0), w(1)
|
||||||
# endif
|
# endif
|
||||||
|
@ -61,7 +61,7 @@ namespace glm
|
|||||||
|
|
||||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, P>::tdualquat()
|
||||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||||
: real(tquat<T, P>())
|
: real(tquat<T, P>())
|
||||||
, dual(tquat<T, P>(0, 0, 0, 0))
|
, dual(tquat<T, P>(0, 0, 0, 0))
|
||||||
@ -71,7 +71,7 @@ namespace glm
|
|||||||
|
|
||||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<T, P> const & d)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, P>::tdualquat(tdualquat<T, P> const & d)
|
||||||
: real(d.real)
|
: real(d.real)
|
||||||
, dual(d.dual)
|
, dual(d.dual)
|
||||||
{}
|
{}
|
||||||
|
Loading…
Reference in New Issue
Block a user