diff --git a/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothColliders.cpp b/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothColliders.cpp index 660220c446..1e57999b6e 100644 --- a/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothColliders.cpp +++ b/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothColliders.cpp @@ -112,7 +112,7 @@ namespace NvCloth colliderConfig.get(), static_cast(shapeConfigPair.second.get()), static_cast(jointIndex), - sphereCount); + static_cast(sphereCount)); sphereColliders.push_back(sphereCollider); ++sphereCount; @@ -144,9 +144,9 @@ namespace NvCloth colliderConfig.get(), static_cast(shapeConfigPair.second.get()), static_cast(jointIndex), - capsuleCount * 2, // Each capsule holds 2 sphere indices - sphereCount + 0, // First sphere index - sphereCount + 1); // Second sphere index + static_cast(capsuleCount * 2), // Each capsule holds 2 sphere indices + static_cast(sphereCount + 0), // First sphere index + static_cast(sphereCount + 1)); // Second sphere index capsuleColliders.push_back(capsuleCollider); ++capsuleCount; diff --git a/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothSkinning.cpp b/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothSkinning.cpp index d42d66293b..5359ed6ad5 100644 --- a/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothSkinning.cpp +++ b/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothSkinning.cpp @@ -481,13 +481,13 @@ namespace NvCloth if (remappedIndex >= 0) { - actorClothSkinning->m_simulatedVertices[remappedIndex] = vertexIndex; + actorClothSkinning->m_simulatedVertices[remappedIndex] = static_cast(vertexIndex); } if (remappedIndex < 0 || originalMeshParticles[vertexIndex].GetW() == 0.0f) { - actorClothSkinning->m_nonSimulatedVertices.emplace_back(vertexIndex); + actorClothSkinning->m_nonSimulatedVertices.emplace_back(static_cast(vertexIndex)); } } actorClothSkinning->m_nonSimulatedVertices.shrink_to_fit(); diff --git a/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ClothComponentMesh.cpp b/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ClothComponentMesh.cpp index 9381d98620..46f9d9a88b 100644 --- a/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ClothComponentMesh.cpp +++ b/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ClothComponentMesh.cpp @@ -556,7 +556,7 @@ namespace NvCloth for (size_t index = 0; index < numVertices; ++index) { - const int renderVertexIndex = firstVertex + index; + const int renderVertexIndex = static_cast(firstVertex + index); const SimParticleFormat& renderParticle = renderParticles[renderVertexIndex]; destVerticesBuffer[index].Set( diff --git a/Gems/NvCloth/Code/Tests/System/ClothTest.cpp b/Gems/NvCloth/Code/Tests/System/ClothTest.cpp index 63d8c78dff..15940570f7 100644 --- a/Gems/NvCloth/Code/Tests/System/ClothTest.cpp +++ b/Gems/NvCloth/Code/Tests/System/ClothTest.cpp @@ -145,7 +145,7 @@ namespace UnitTest }}; nv::cloth::Vector::Type nvEmpty; - nv::cloth::Vector::Type nvValues(azValues.size()); + nv::cloth::Vector::Type nvValues(static_cast(azValues.size())); nv::cloth::Range nvEmptyRange(nvEmpty.begin(), nvEmpty.end()); nv::cloth::Range nvValuesRange(nvValues.begin(), nvValues.end()); @@ -192,7 +192,7 @@ namespace UnitTest }}; nv::cloth::Vector::Type nvEmpty; - nv::cloth::Vector::Type nvValues(azValues.size()); + nv::cloth::Vector::Type nvValues(static_cast(azValues.size())); nv::cloth::Range nvEmptyRange(nvEmpty.begin(), nvEmpty.end()); nv::cloth::Range nvValuesRange(nvValues.begin(), nvValues.end()); @@ -336,7 +336,7 @@ namespace UnitTest const nv::cloth::MappedRange nvClothPreviousParticles = nv::cloth::readPreviousParticles(*m_nvCloth); for (size_t i = 0; i < newParticles.size(); ++i) { - EXPECT_NEAR(newParticles[i].GetW(), nvClothPreviousParticles[i].w, Tolerance); + EXPECT_NEAR(newParticles[i].GetW(), nvClothPreviousParticles[static_cast(i)].w, Tolerance); } } @@ -364,7 +364,7 @@ namespace UnitTest const nv::cloth::MappedRange nvClothPreviousParticles = nv::cloth::readPreviousParticles(*m_nvCloth); for (size_t i = 0; i < newParticles.size(); ++i) { - EXPECT_NEAR(newParticles[i].GetW(), nvClothPreviousParticles[i].w, Tolerance); + EXPECT_NEAR(newParticles[i].GetW(), nvClothPreviousParticles[static_cast(i)].w, Tolerance); } } @@ -378,7 +378,7 @@ namespace UnitTest EXPECT_EQ(nvClothCurrentParticles.size(), nvClothPreviousParticles.size()); for (size_t i = 0; i < nvClothCurrentParticles.size(); ++i) { - ExpectEq(nvClothCurrentParticles[i], nvClothPreviousParticles[i]); + ExpectEq(nvClothCurrentParticles[static_cast(i)], nvClothPreviousParticles[static_cast(i)]); } } @@ -468,7 +468,7 @@ namespace UnitTest EXPECT_EQ(nvClothCurrentParticles.size(), nvClothPreviousParticles.size()); for (size_t i = 0; i < nvClothCurrentParticles.size(); ++i) { - ExpectEq(nvClothCurrentParticles[i], nvClothPreviousParticles[i]); + ExpectEq(nvClothCurrentParticles[static_cast(i)], nvClothPreviousParticles[static_cast(i)]); } } @@ -504,8 +504,8 @@ namespace UnitTest EXPECT_EQ(initialParticles.size(), nvClothPreviousParticles.size()); for (size_t i = 0; i < initialParticles.size(); ++i) { - ExpectEq(initialParticles[i], nvClothCurrentParticles[i]); - ExpectEq(initialParticles[i], nvClothPreviousParticles[i]); + ExpectEq(initialParticles[i], nvClothCurrentParticles[static_cast(i)]); + ExpectEq(initialParticles[i], nvClothPreviousParticles[static_cast(i)]); } } @@ -614,7 +614,7 @@ namespace UnitTest const nv::cloth::MappedRange nvClothPreviousParticles = nv::cloth::readPreviousParticles(*m_nvCloth); for (size_t i = 0; i < initialParticles.size(); ++i) { - EXPECT_NEAR(nvClothPreviousParticles[i].w, initialParticles[i].GetW() / globalMass, Tolerance); + EXPECT_NEAR(nvClothPreviousParticles[static_cast(i)].w, initialParticles[i].GetW() / globalMass, Tolerance); } } } // namespace UnitTest