From dc9a2486d634ddc96f2032e8b242f89432082f3f Mon Sep 17 00:00:00 2001 From: Dave Reid Date: Sat, 22 Dec 2012 11:57:19 +1000 Subject: [PATCH] Fix a -Wswitch-default warning in GCC. The default case should never actually be met. I've added an assert(false) statement here for sanity. --- glm/gtc/quaternion.inl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index 1906a16f..d1e76026 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -707,6 +707,10 @@ namespace detail Result.y = (m[1][2] + m[2][1]) * mult; Result.z = biggestVal; break; + + default: // Silence a -Wswitch-default warning in GCC. Should never actually get here. Assert is just for sanity. + assert(false); + break; } return Result; }