From 1ae9bb5467d7e8979a0f672d86824e4b9192318a Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Tue, 12 Apr 2016 21:32:35 +0200 Subject: [PATCH] Fix warning --- src/collision/shapes/ConcaveMeshShape.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/collision/shapes/ConcaveMeshShape.cpp b/src/collision/shapes/ConcaveMeshShape.cpp index 084e9265..317a1c65 100644 --- a/src/collision/shapes/ConcaveMeshShape.cpp +++ b/src/collision/shapes/ConcaveMeshShape.cpp @@ -131,7 +131,7 @@ void ConcaveMeshShape::getTriangleVerticesWithIndexPointer(int32 subPart, int32 for (int k=0; k < 3; k++) { // Get the index of the current vertex in the triangle - int vertexIndex; + int vertexIndex = 0; if (indexType == TriangleVertexArray::INDEX_INTEGER_TYPE) { vertexIndex = ((uint*)vertexIndexPointer)[k]; } @@ -155,6 +155,9 @@ void ConcaveMeshShape::getTriangleVerticesWithIndexPointer(int32 subPart, int32 outTriangleVertices[k][1] = decimal(vertices[1]) * mScaling.y; outTriangleVertices[k][2] = decimal(vertices[2]) * mScaling.z; } + else { + assert(false); + } } }