coord: remove inadvertant warning disabling

This commit is contained in:
Danny Robson 2015-09-21 15:40:36 +10:00
parent 37f9390ef8
commit 5c72953653
3 changed files with 17 additions and 1 deletions

View File

@ -35,7 +35,7 @@ const util::colour<S,T> \
util::colour<S,T>::NAME = \
util::colour<4,float> (R,G,B,1) \
.template redim<S> () \
.template cast<T> ();
.template cast<T> ()
CONSTANT_COLOUR(WHITE,1,1,1);
CONSTANT_COLOUR(BLACK,0,0,0);

View File

@ -139,6 +139,8 @@ namespace util { namespace coord {
struct { T w,h,d; };
};
};
#pragma GCC diagnostic pop
} }
#endif

View File

@ -26,12 +26,26 @@
namespace util {
template <typename T>
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 {
struct { T w, x, y, z; };
struct { T a, b, c, d; };
T data[4];
};
#pragma GCC diagnostic pop
static const quaternion IDENTITY;
static quaternion rotation (T radians, vector<3,T> axis);