fix w4018

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-18 17:45:51 -07:00
committed by Esteban Papp
parent 97354ce90a
commit 10f950b726
33 changed files with 72 additions and 73 deletions
@@ -353,10 +353,10 @@ namespace LmbrCentral
const AZ::u32 sides, const AZ::u32 segments, const AZ::u32 capSegments,
AZ::u32* indices)
{
const auto capSegmentTipVerts = capSegments > 0 ? 1 : 0;
const auto totalSegments = segments + capSegments * 2;
const auto numVerts = sides * (totalSegments + 1) + 2 * capSegmentTipVerts;
const auto hasEnds = capSegments > 0;
const AZ::u32 capSegmentTipVerts = capSegments > 0 ? 1 : 0;
const AZ::u32 totalSegments = segments + capSegments * 2;
const AZ::u32 numVerts = sides * (totalSegments + 1) + 2 * capSegmentTipVerts;
const AZ::u32 hasEnds = capSegments > 0;
// Start Faces (start point of tube)
// Each starting face shares the same vertex at the beginning of the vertex buffer
@@ -365,8 +365,7 @@ namespace LmbrCentral
// 1 face per side
if (hasEnds)
{
for (auto i = 0; i < sides; ++i)
for (AZ::u32 i = 0; i < sides; ++i)
{
AZ::u32 a = i + 1;
AZ::u32 b = a + 1;
@@ -383,9 +382,9 @@ namespace LmbrCentral
// Middle Faces
// 2 triangles per face.
// 1 face per side.
for (auto i = 0; i < totalSegments; ++i)
for (AZ::u32 i = 0; i < totalSegments; ++i)
{
for (auto j = 0; j < sides; ++j)
for (AZ::u32 j = 0; j < sides; ++j)
{
// 4 corners for each face
// a ------ d
@@ -416,7 +415,7 @@ namespace LmbrCentral
// 1 face per side
if (hasEnds)
{
for (auto i = 0; i < sides; ++i)
for (AZ::u32 i = 0; i < sides; ++i)
{
AZ::u32 a = totalSegments * sides + i + 1;
AZ::u32 b = a + 1;