Make swizzles explicit
This commit is contained in:
parent
63d2a6e318
commit
a7c114cf5f
|
@ -88,12 +88,8 @@ namespace orange
|
|||
copy(&components[0], &components[2], data.begin());
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
constexpr Swizzle(const Args&... args)
|
||||
: data {{ args... }}
|
||||
{
|
||||
static_assert(sizeof...(Args) == 2);
|
||||
}
|
||||
constexpr Swizzle(T x, T y)
|
||||
: data {{ x, y }} {}
|
||||
|
||||
constexpr Swizzle(const Swizzle& other) = default;
|
||||
};
|
||||
|
@ -131,12 +127,8 @@ namespace orange
|
|||
copy(&components[0], &components[3], data.begin());
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
constexpr Swizzle(const Args&... args)
|
||||
: data {{ args... }}
|
||||
{
|
||||
static_assert(sizeof...(Args) == 3);
|
||||
}
|
||||
constexpr Swizzle(T x, T y, T z)
|
||||
: data {{ x, y, z }} {}
|
||||
|
||||
constexpr Swizzle(const Swizzle& other) = default;
|
||||
};
|
||||
|
@ -176,12 +168,8 @@ namespace orange
|
|||
copy(&components[0], &components[4], data.begin());
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
constexpr Swizzle(const Args&... args)
|
||||
: data {{ args... }}
|
||||
{
|
||||
static_assert(sizeof...(Args) == 4);
|
||||
}
|
||||
constexpr Swizzle(T x, T y, T z, T w)
|
||||
: data {{ x, y, z, w }} {}
|
||||
|
||||
constexpr Swizzle(const Swizzle& other) = default;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue