From 8d4dd14144f6e3de4bf4bd30ef9427284217384b Mon Sep 17 00:00:00 2001 From: Azaezel Date: Sun, 16 Oct 2016 15:31:56 -0500 Subject: [PATCH] clang catch: boxBase's getPlanePointIndex method wasn't returning values in all cases. assertfatal doesn't do anything in release builds, so also added a failure enum. --- Engine/source/math/mBoxBase.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Engine/source/math/mBoxBase.h b/Engine/source/math/mBoxBase.h index ef7e9a9e2..880c8df6e 100644 --- a/Engine/source/math/mBoxBase.h +++ b/Engine/source/math/mBoxBase.h @@ -49,7 +49,8 @@ class BoxBase FarTopLeft, FarBottomLeft, - NUM_POINTS + NUM_POINTS, + InvalidPoint = NUM_POINTS }; /// Return the point index for the opposite corner of @a p. @@ -192,8 +193,6 @@ class BoxBase default: AssertFatal( false, "BoxBase::getPlanePointIndex - Invalid index" ); } break; - default: - AssertFatal( false, "BoxBase::getPlanePointIndex - Invalid plane" ); case BottomPlane: switch( i ) { @@ -204,7 +203,10 @@ class BoxBase default: AssertFatal( false, "BoxBase::getPlanePointIndex - Invalid index" ); } break; + default: + AssertFatal( false, "BoxBase::getPlanePointIndex - Invalid plane" ); } + return InvalidPoint; } /// Indices for the edges of the box.