Wrap tvec2's static constants in GLM_STATIC_CONST_MEMBERS

master
Jesse Talavera-Greenberg ago%!(EXTRA string=10 years)
parent 5a60b3986b
commit 4552ec737e
  1. 3
      glm/detail/type_vec2.hpp
  2. 2
      glm/detail/type_vec2.inl
  3. 2
      test/core/core_type_vec2.cpp

@ -58,10 +58,13 @@ namespace glm
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
# ifdef GLM_STATIC_CONST_MEMBERS
static const type ZERO;
static const type X;
static const type Y;
static const type XY;
# endif
// -- Data --
# if GLM_HAS_ANONYMOUS_UNION

@ -28,6 +28,7 @@
namespace glm
{
# ifdef GLM_STATIC_CONST_MEMBERS
template <typename T, precision P>
const tvec2<T, P> tvec2<T, P>::ZERO = tvec2<T, P>(static_cast<T>(0), static_cast<T>(0));
@ -39,6 +40,7 @@ namespace glm
template <typename T, precision P>
const tvec2<T, P> tvec2<T, P>::XY = tvec2<T, P>(static_cast<T>(1), static_cast<T>(1));
# endif
// -- Implicit basic constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)

@ -29,6 +29,7 @@
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#define GLM_STATIC_CONST_MEMBERS
#if !(GLM_COMPILER & GLM_COMPILER_GCC)
# define GLM_META_PROG_HELPERS
#endif
@ -40,6 +41,7 @@
# include <type_traits>
#endif
int test_vec2_operators()
{
int Error = 0;

Loading…
Cancel
Save