coord: remove inadvertant warning disabling
This commit is contained in:
parent
37f9390ef8
commit
5c72953653
@ -35,7 +35,7 @@ const util::colour<S,T> \
|
|||||||
util::colour<S,T>::NAME = \
|
util::colour<S,T>::NAME = \
|
||||||
util::colour<4,float> (R,G,B,1) \
|
util::colour<4,float> (R,G,B,1) \
|
||||||
.template redim<S> () \
|
.template redim<S> () \
|
||||||
.template cast<T> ();
|
.template cast<T> ()
|
||||||
|
|
||||||
CONSTANT_COLOUR(WHITE,1,1,1);
|
CONSTANT_COLOUR(WHITE,1,1,1);
|
||||||
CONSTANT_COLOUR(BLACK,0,0,0);
|
CONSTANT_COLOUR(BLACK,0,0,0);
|
||||||
|
@ -139,6 +139,8 @@ namespace util { namespace coord {
|
|||||||
struct { T w,h,d; };
|
struct { T w,h,d; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
} }
|
} }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,12 +26,26 @@
|
|||||||
namespace util {
|
namespace util {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct quaternion {
|
struct quaternion {
|
||||||
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
// Disable GCC warnings about validity of anonyous structures in
|
||||||
|
// unions. Push comes to shove I'll manually redsign everything to
|
||||||
|
// keep this syntax anyway.
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#if defined(COMPILER_GCC)
|
||||||
|
#pragma GCC diagnostic ignored "-pedantic"
|
||||||
|
#endif
|
||||||
|
#if defined(COMPILER_CLANG)
|
||||||
|
#pragma GCC diagnostic ignored "-Wgnu"
|
||||||
|
#endif
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct { T w, x, y, z; };
|
struct { T w, x, y, z; };
|
||||||
struct { T a, b, c, d; };
|
struct { T a, b, c, d; };
|
||||||
T data[4];
|
T data[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
static const quaternion IDENTITY;
|
static const quaternion IDENTITY;
|
||||||
|
|
||||||
static quaternion rotation (T radians, vector<3,T> axis);
|
static quaternion rotation (T radians, vector<3,T> axis);
|
||||||
|
Loading…
Reference in New Issue
Block a user