Remove Clang warnings

This commit is contained in:
Alexander Bock
2021-07-30 14:56:55 +02:00
parent 5b3a66156c
commit c96764aa1c
10 changed files with 31 additions and 32 deletions

View File

@@ -215,7 +215,10 @@ void RenderablePrism::updateVertexData() {
for (int i = 0; i < 2; ++i) {
float h = i * _length; // z value, 0 to _length
for (int j = 0, k = 0; j < _nShapeSegments && k < unitVertices.size(); ++j, k += 2) {
for (int j = 0, k = 0;
j < _nShapeSegments && k < static_cast<int>(unitVertices.size());
++j, k += 2)
{
float ux = unitVertices[k];
float uy = unitVertices[k + 1];
@@ -239,7 +242,10 @@ void RenderablePrism::updateVertexData() {
_vertexArray.push_back(_length);
}
else {
for (int j = 0, k = 0; j < _nLines && k < unitVerticesLines.size(); ++j, k += 2) {
for (int j = 0, k = 0;
j < _nLines && k < static_cast<int>(unitVerticesLines.size());
++j, k += 2)
{
float ux = unitVerticesLines[k];
float uy = unitVerticesLines[k + 1];