Fix compilation warnings

This commit is contained in:
Daniel Chappuis 2018-04-21 20:03:44 +02:00
parent b714149b55
commit b0f9cfd65a
5 changed files with 15 additions and 6 deletions

View File

@ -226,6 +226,7 @@ inline Vector3 BoxShape::getFaceNormal(uint faceIndex) const {
} }
assert(false); assert(false);
return Vector3::zero();
} }
// Return the centroid of the box // Return the centroid of the box

View File

@ -765,6 +765,7 @@ class Map {
} }
assert(false); assert(false);
return end();
} }
/// Return a end iterator /// Return a end iterator

View File

@ -706,6 +706,7 @@ class Set {
} }
assert(false); assert(false);
return end();
} }
/// Return a end iterator /// Return a end iterator

View File

@ -67,6 +67,9 @@ class Logger {
case Category::Joint: return "Joint"; case Category::Joint: return "Joint";
case Category::ProxyShape: return "ProxyShape"; case Category::ProxyShape: return "ProxyShape";
} }
assert(false);
return "";
} }
/// Return the name of a level /// Return the name of a level
@ -77,6 +80,9 @@ class Logger {
case Level::Warning: return "Warning"; case Level::Warning: return "Warning";
case Level::Error: return "Error"; case Level::Error: return "Error";
} }
assert(false);
return "";
} }
/// Log formatter /// Log formatter

View File

@ -215,15 +215,15 @@ class TestTriangleVertexArray : public Test {
mTriangleVertexArray2->getTriangleVerticesIndices(0, triangle0Indices); mTriangleVertexArray2->getTriangleVerticesIndices(0, triangle0Indices);
test(triangle0Indices[0] == static_cast<short>(mIndices2[0])); test(triangle0Indices[0] == static_cast<uint>(mIndices2[0]));
test(triangle0Indices[1] == static_cast<short>(mIndices2[1])); test(triangle0Indices[1] == static_cast<uint>(mIndices2[1]));
test(triangle0Indices[2] == static_cast<short>(mIndices2[2])); test(triangle0Indices[2] == static_cast<uint>(mIndices2[2]));
mTriangleVertexArray2->getTriangleVerticesIndices(1, triangle1Indices); mTriangleVertexArray2->getTriangleVerticesIndices(1, triangle1Indices);
test(triangle1Indices[0] == static_cast<short>(mIndices2[3])); test(triangle1Indices[0] == static_cast<uint>(mIndices2[3]));
test(triangle1Indices[1] == static_cast<short>(mIndices2[4])); test(triangle1Indices[1] == static_cast<uint>(mIndices2[4]));
test(triangle1Indices[2] == static_cast<short>(mIndices2[5])); test(triangle1Indices[2] == static_cast<uint>(mIndices2[5]));
// Get triangle vertices // Get triangle vertices