diff options
author | Brad Linden <brad@lindenlab.com> | 2024-06-12 11:41:20 -0700 |
---|---|---|
committer | Brad Linden <brad@lindenlab.com> | 2024-06-12 12:53:45 -0700 |
commit | 8729c0d2c41d7acb2357a5ba9f3a713fe9bcc426 (patch) | |
tree | 66cd8e88984425333c77e043f4946ac6630e3a8d /indra/newview/gltf | |
parent | d12c897bfc77a800fcec5e22a21c9d0344b0d0bc (diff) |
Fixup more signed/unsigned warnings after merge.
Diffstat (limited to 'indra/newview/gltf')
-rw-r--r-- | indra/newview/gltf/primitive.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/gltf/primitive.cpp b/indra/newview/gltf/primitive.cpp index dd37b5b4d0..2280c7004e 100644 --- a/indra/newview/gltf/primitive.cpp +++ b/indra/newview/gltf/primitive.cpp @@ -56,9 +56,9 @@ struct MikktMesh bool copy(const Primitive* prim) { bool indexed = !prim->mIndexArray.empty(); - auto vert_count = indexed ? prim->mIndexArray.size() : prim->mPositions.size(); + size_t vert_count = indexed ? prim->mIndexArray.size() : prim->mPositions.size(); - U32 triangle_count = 0; + size_t triangle_count = 0; if (prim->mMode == Primitive::Mode::TRIANGLE_STRIP || prim->mMode == Primitive::Mode::TRIANGLE_FAN) @@ -76,6 +76,7 @@ struct MikktMesh } vert_count = triangle_count * 3; + llassert(vert_count <= size_t(U32_MAX)); // triangle_count will also naturally be under the limit p.resize(vert_count); n.resize(vert_count); @@ -106,7 +107,7 @@ struct MikktMesh tc1.resize(vert_count); } - for (int tri_idx = 0; tri_idx < triangle_count; ++tri_idx) + for (U32 tri_idx = 0; tri_idx < U32(triangle_count); ++tri_idx) { U32 idx[3]; @@ -222,7 +223,7 @@ struct MikktMesh std::vector<U32> remap; remap.resize(p.size()); - U32 stream_count = mos.size(); + size_t stream_count = mos.size(); size_t vert_count = meshopt_generateVertexRemapMulti(&remap[0], nullptr, p.size(), p.size(), mos.data(), stream_count); |