colour: style

This commit is contained in:
Danny Robson 2018-03-06 18:13:39 +11:00
parent 01b1c01a07
commit d29f2ed235

View File

@ -52,20 +52,32 @@ namespace util {
template <typename T>
struct util::coord::store<1,T,srgba<1,T>> {
union { struct { T r; }; T data[1]; };
union {
struct { T r; };
T data[1];
};
};
template <typename T>
struct util::coord::store<2,T,srgba<2,T>> {
union { struct { T r, g; }; T data[2]; };
union {
struct { T r, g; };
T data[2];
};
};
template <typename T>
struct util::coord::store<3,T,srgba<3,T>> {
union { struct { T r, g, b; }; T data[3]; };
union {
struct { T r, g, b; };
T data[3];
};
};
template <typename T>
struct util::coord::store<4,T,srgba<4,T>> {
union { struct { T r, g, b, a; }; T data[4]; };
union {
struct { T r, g, b, a; };
T data[4];
};
};
template <size_t S, typename T> struct srgba : colour<S,T,srgba<S,T>> {