Clean up initializer list code.
This commit is contained in:
@@ -32,9 +32,6 @@
|
||||
#include "../fwd.hpp"
|
||||
#include "type_vec4.hpp"
|
||||
#include "type_mat.hpp"
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
# include <initializer_list>
|
||||
#endif //GLM_HAS_INITIALIZER_LISTS
|
||||
#include <limits>
|
||||
#include <cstddef>
|
||||
|
||||
|
||||
@@ -38,9 +38,6 @@
|
||||
# include "_swizzle_func.hpp"
|
||||
# endif
|
||||
#endif //GLM_SWIZZLE
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
# include <initializer_list>
|
||||
#endif //GLM_HAS_INITIALIZER_LISTS
|
||||
#include <cstddef>
|
||||
|
||||
namespace glm{
|
||||
@@ -82,11 +79,6 @@ namespace detail
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tvec1(tvec1<T, Q> const & v);
|
||||
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tvec1(std::initializer_list<U> const & v);
|
||||
#endif//GLM_HAS_INITIALIZER_LISTS
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
|
||||
@@ -71,16 +71,6 @@ namespace detail
|
||||
x(v.x)
|
||||
{}
|
||||
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(std::initializer_list<U> const & v) :
|
||||
x(static_cast<T>(v.begin()[0]))
|
||||
{
|
||||
assert(v.size() == this->length());
|
||||
}
|
||||
#endif//GLM_HAS_INITIALIZER_LISTS
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
|
||||
@@ -38,9 +38,6 @@
|
||||
# include "_swizzle_func.hpp"
|
||||
# endif
|
||||
#endif //GLM_SWIZZLE
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
# include <initializer_list>
|
||||
#endif //GLM_HAS_INITIALIZER_LISTS
|
||||
#include <cstddef>
|
||||
|
||||
namespace glm{
|
||||
|
||||
@@ -38,9 +38,6 @@
|
||||
# include "_swizzle_func.hpp"
|
||||
# endif
|
||||
#endif //GLM_SWIZZLE
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
# include <initializer_list>
|
||||
#endif //GLM_HAS_INITIALIZER_LISTS
|
||||
#include <cstddef>
|
||||
|
||||
namespace glm{
|
||||
|
||||
@@ -39,9 +39,6 @@
|
||||
# include "_swizzle_func.hpp"
|
||||
# endif
|
||||
#endif //GLM_SWIZZLE
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
# include <initializer_list>
|
||||
#endif //GLM_HAS_INITIALIZER_LISTS
|
||||
#include <cstddef>
|
||||
|
||||
namespace glm{
|
||||
|
||||
@@ -71,20 +71,15 @@ namespace detail
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tquat(
|
||||
tquat<U, Q> const & q);
|
||||
GLM_FUNC_DECL explicit tquat(
|
||||
GLM_FUNC_DECL tquat(
|
||||
T const & s,
|
||||
tvec3<T, P> const & v);
|
||||
GLM_FUNC_DECL explicit tquat(
|
||||
GLM_FUNC_DECL tquat(
|
||||
T const & w,
|
||||
T const & x,
|
||||
T const & y,
|
||||
T const & z);
|
||||
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tquat(std::initializer_list<U> l);
|
||||
#endif//GLM_HAS_INITIALIZER_LISTS
|
||||
|
||||
// Convertions
|
||||
|
||||
/// Create a quaternion from two normalized axis
|
||||
|
||||
@@ -86,19 +86,6 @@ namespace detail
|
||||
w(w)
|
||||
{}
|
||||
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(std::initializer_list<U> l) :
|
||||
x(static_cast<T>(l.begin()[0])),
|
||||
y(static_cast<T>(l.begin()[1])),
|
||||
z(static_cast<T>(l.begin()[2])),
|
||||
w(static_cast<T>(l.begin()[3]))
|
||||
{
|
||||
assert(l.size() >= this->length());
|
||||
}
|
||||
#endif//GLM_HAS_INITIALIZER_LISTS
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// tquat conversions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user