瀏覽代碼

Merge pull request #1807 from Azaezel/boxBaseBorked

clang catch: boxBase's getPlanePointIndex method wasn't returning values in all cases.
Areloch 8 年之前
父節點
當前提交
1a851f167d
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      Engine/source/math/mBoxBase.h

+ 5 - 3
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.