reactphysics3d/src/collision/TriangleVertexArray.cpp: In member function ‘reactphysics3d::Vector3 reactphysics3d::TriangleVertexArray::getVertex(reactphysics3d::uint32) const’:
reactphysics3d/src/collision/TriangleVertexArray.cpp:163:1: warning: control reaches end of non-void function [-Wreturn-type]
163 | }
| ^
This is the only warning I got during compilation, and may be an error point in many applications.
Looking at the code, there's a single assert(false) instead of a return, but add something like a throw after it so the compiler doesn't give this warning.
|
return Vector3(decimal(vertices[0]), decimal(vertices[1]), decimal(vertices[2])); |
|
} |
|
else { |
|
assert(false); |
|
} |
|
} |
reactphysics3d/src/collision/TriangleVertexArray.cpp: In member function ‘reactphysics3d::Vector3 reactphysics3d::TriangleVertexArray::getVertex(reactphysics3d::uint32) const’: reactphysics3d/src/collision/TriangleVertexArray.cpp:163:1: warning: control reaches end of non-void function [-Wreturn-type] 163 | } | ^This is the only warning I got during compilation, and may be an error point in many applications.
Looking at the code, there's a single
assert(false)instead of a return, but add something like athrowafter it so the compiler doesn't give this warning.reactphysics3d/src/collision/TriangleVertexArray.cpp
Lines 158 to 163 in 4030136