Updated _MAYBE to follow GLM conventions

This commit is contained in:
Christophe Riccio 2015-07-24 02:02:24 +02:00
parent 1b9872138d
commit f602c8e7ad
19 changed files with 75 additions and 75 deletions

View File

@ -925,16 +925,16 @@
#if GLM_HAS_CONSTEXPR
# define GLM_CONSTEXPR constexpr
# define GLM_CONSTEXPR_MAYBE constexpr
# define GLM_RELAXED_CONSTEXPR constexpr
#else
# define GLM_CONSTEXPR
# define GLM_CONSTEXPR_MAYBE const
# define GLM_RELAXED_CONSTEXPR const
#endif
#ifdef GLM_FORCE_EXPLICIT_CTOR
# define GLM_EXPLICIT_CTOR_MAYBE explicit
# define GLM_EXPLICIT explicit
#else
# define GLM_EXPLICIT_CTOR_MAYBE
# define GLM_EXPLICIT
#endif
///////////////////////////////////////////////////////////////////////////////////

View File

@ -55,10 +55,10 @@ namespace glm
friend tvec2<U, Q> operator/(tvec2<U, Q> const & v, tmat2x2<U, Q> const & m);
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 2;
static GLM_CONSTEXPR_MAYBE length_t columns = 2;
static GLM_CONSTEXPR_MAYBE length_t rows = 2;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 2;
static GLM_RELAXED_CONSTEXPR length_t columns = 2;
static GLM_RELAXED_CONSTEXPR length_t rows = 2;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
private:
@ -99,7 +99,7 @@ namespace glm
// Matrix conversions
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat2x2(tmat2x2<U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x2<U, Q> const & m);
GLM_FUNC_DECL explicit tmat2x2(tmat3x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat4x4<T, P> const & x);

View File

@ -51,10 +51,10 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 2;
static GLM_CONSTEXPR_MAYBE length_t cols = 3;
static GLM_CONSTEXPR_MAYBE length_t rows = 2;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 2;
static GLM_RELAXED_CONSTEXPR length_t cols = 3;
static GLM_RELAXED_CONSTEXPR length_t rows = 2;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
private:
@ -95,7 +95,7 @@ namespace glm
// Matrix conversion
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat2x3(tmat2x3<U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat2x3<U, Q> const & m);
GLM_FUNC_DECL explicit tmat2x3(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat3x3<T, P> const & x);

View File

@ -51,10 +51,10 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 2;
static GLM_CONSTEXPR_MAYBE length_t cols = 4;
static GLM_CONSTEXPR_MAYBE length_t rows = 2;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 2;
static GLM_RELAXED_CONSTEXPR length_t cols = 4;
static GLM_RELAXED_CONSTEXPR length_t rows = 2;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
private:
@ -96,7 +96,7 @@ namespace glm
// Matrix conversions
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat2x4(tmat2x4<U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x4<U, Q> const & m);
GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T, P> const & x);

View File

@ -51,10 +51,10 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 3;
static GLM_CONSTEXPR_MAYBE length_t cols = 2;
static GLM_CONSTEXPR_MAYBE length_t rows = 3;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 3;
static GLM_RELAXED_CONSTEXPR length_t cols = 2;
static GLM_RELAXED_CONSTEXPR length_t rows = 3;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
private:
@ -102,7 +102,7 @@ namespace glm
// Matrix conversions
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat3x2(tmat3x2<U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat3x2<U, Q> const & m);
GLM_FUNC_DECL explicit tmat3x2(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat3x3<T, P> const & x);

View File

@ -50,10 +50,10 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 3;
static GLM_CONSTEXPR_MAYBE length_t cols = 3;
static GLM_CONSTEXPR_MAYBE length_t rows = 3;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 3;
static GLM_RELAXED_CONSTEXPR length_t cols = 3;
static GLM_RELAXED_CONSTEXPR length_t rows = 3;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
template <typename U, precision Q>
@ -106,7 +106,7 @@ namespace glm
// Matrix conversions
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat3x3(tmat3x3<U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat3x3<U, Q> const & m);
GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T, P> const & x);

View File

@ -51,10 +51,10 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 3;
static GLM_CONSTEXPR_MAYBE length_t cols = 4;
static GLM_CONSTEXPR_MAYBE length_t rows = 3;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 3;
static GLM_RELAXED_CONSTEXPR length_t cols = 4;
static GLM_RELAXED_CONSTEXPR length_t rows = 3;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
private:
@ -101,7 +101,7 @@ namespace glm
// Matrix conversion
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat3x4(tmat3x4<U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat3x4<U, Q> const & m);
GLM_FUNC_DECL explicit tmat3x4(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat3x3<T, P> const & x);

View File

@ -51,10 +51,10 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 4;
static GLM_CONSTEXPR_MAYBE length_t cols = 2;
static GLM_CONSTEXPR_MAYBE length_t rows = 4;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 4;
static GLM_RELAXED_CONSTEXPR length_t cols = 2;
static GLM_RELAXED_CONSTEXPR length_t rows = 4;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
private:
@ -107,7 +107,7 @@ namespace glm
// Matrix conversions
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat4x2(tmat4x2<U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat4x2<U, Q> const & m);
GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat3x3<T, P> const & x);

View File

@ -51,10 +51,10 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 4;
static GLM_CONSTEXPR_MAYBE length_t cols = 3;
static GLM_CONSTEXPR_MAYBE length_t rows = 4;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 4;
static GLM_RELAXED_CONSTEXPR length_t cols = 3;
static GLM_RELAXED_CONSTEXPR length_t rows = 4;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
private:
@ -106,7 +106,7 @@ namespace glm
// Matrix conversions
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat4x3(tmat4x3<U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x3<U, Q> const & m);
GLM_FUNC_DECL explicit tmat4x3(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat3x3<T, P> const & x);

View File

@ -50,10 +50,10 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 4;
static GLM_CONSTEXPR_MAYBE length_t cols = 4;
static GLM_CONSTEXPR_MAYBE length_t rows = 4;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 4;
static GLM_RELAXED_CONSTEXPR length_t cols = 4;
static GLM_RELAXED_CONSTEXPR length_t rows = 4;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
template <typename U, precision Q>
@ -111,7 +111,7 @@ namespace glm
// Matrix conversions
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat4x4(tmat4x4<U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat4x4<U, Q> const & m);
GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat3x3<T, P> const & x);

View File

@ -56,8 +56,8 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 1;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 1;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
//////////////////////////////////////
@ -138,7 +138,7 @@ namespace glm
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tvec1(tvec1<U, Q> const & v);
GLM_FUNC_DECL GLM_EXPLICIT tvec1(tvec1<U, Q> const & v);
//////////////////////////////////////
// Swizzle constructors

View File

@ -56,8 +56,8 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 2;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 2;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
//////////////////////////////////////
@ -146,7 +146,7 @@ namespace glm
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tvec2(tvec2<U, Q> const & v);
GLM_FUNC_DECL GLM_EXPLICIT tvec2(tvec2<U, Q> const & v);
//////////////////////////////////////
// Swizzle constructors

View File

@ -56,8 +56,8 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 3;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 3;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
//////////////////////////////////////
@ -156,7 +156,7 @@ namespace glm
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tvec3(tvec3<U, Q> const & v);
GLM_FUNC_DECL GLM_EXPLICIT tvec3(tvec3<U, Q> const & v);
//////////////////////////////////////
// Swizzle constructors

View File

@ -110,8 +110,8 @@ namespace detail
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 4;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 4;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
//////////////////////////////////////
@ -232,7 +232,7 @@ namespace detail
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tvec4(tvec4<U, Q> const & v);
GLM_FUNC_DECL GLM_EXPLICIT tvec4(tvec4<U, Q> const & v);
//////////////////////////////////////
// Swizzle constructors

View File

@ -66,8 +66,8 @@ namespace glm
typedef T value_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 4;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 4;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
public:
@ -111,7 +111,7 @@ namespace glm
// Conversions
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tquat(tquat<U, Q> const & q);
GLM_FUNC_DECL GLM_EXPLICIT tquat(tquat<U, Q> const & q);
// explicit conversion operators
# if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS

View File

@ -65,8 +65,8 @@ namespace glm
typedef glm::tquat<T, P> part_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 8;
static GLM_CONSTEXPR_MAYBE precision prec = P;
static GLM_RELAXED_CONSTEXPR length_t components = 8;
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
public:
@ -111,7 +111,7 @@ namespace glm
// tdualquat conversions
template <typename U, precision Q>
GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tdualquat(tdualquat<U, Q> const & q);
GLM_FUNC_DECL GLM_EXPLICIT tdualquat(tdualquat<U, Q> const & q);
GLM_FUNC_DECL explicit tdualquat(tmat2x4<T, P> const & holder_mat);
GLM_FUNC_DECL explicit tdualquat(tmat3x4<T, P> const & aug_mat);

View File

@ -72,10 +72,10 @@ namespace detail
typedef fmat4x4SIMD transpose_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 4;
static GLM_CONSTEXPR_MAYBE length_t cols = 4;
static GLM_CONSTEXPR_MAYBE length_t rows = 4;
static GLM_CONSTEXPR_MAYBE precision prec = defaultp;
static GLM_RELAXED_CONSTEXPR length_t components = 4;
static GLM_RELAXED_CONSTEXPR length_t cols = 4;
static GLM_RELAXED_CONSTEXPR length_t rows = 4;
static GLM_RELAXED_CONSTEXPR precision prec = defaultp;
# endif//GLM_META_PROG_HELPERS
GLM_FUNC_DECL length_t length() const;

View File

@ -77,8 +77,8 @@ namespace detail
typedef tquat<bool, defaultp> bool_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 4;
static GLM_CONSTEXPR_MAYBE precision prec = defaultp;
static GLM_RELAXED_CONSTEXPR length_t components = 4;
static GLM_RELAXED_CONSTEXPR precision prec = defaultp;
# endif//GLM_META_PROG_HELPERS
#ifdef GLM_SIMD_ENABLE_XYZW_UNION

View File

@ -100,8 +100,8 @@ namespace detail
typedef tvec4<bool, highp> bool_type;
# ifdef GLM_META_PROG_HELPERS
static GLM_CONSTEXPR_MAYBE length_t components = 4;
static GLM_CONSTEXPR_MAYBE precision prec = defaultp;
static GLM_RELAXED_CONSTEXPR length_t components = 4;
static GLM_RELAXED_CONSTEXPR precision prec = defaultp;
# endif//GLM_META_PROG_HELPERS
#ifdef GLM_SIMD_ENABLE_XYZW_UNION