MeshOptimizer: Fix clang -Wrange-loop-analysis errors

This commit is contained in:
Luke Street 2020-09-18 16:21:52 -04:00
parent 917ac88db5
commit a5f5308dc3
1 changed files with 2 additions and 2 deletions

View File

@ -234,7 +234,7 @@ Mesh::Surface MeshOptimizer::generate_surface(std::vector<uint32_t>& island_face
ret.aabbMin.val.simd = athena::simd<float>(FLT_MAX); ret.aabbMin.val.simd = athena::simd<float>(FLT_MAX);
ret.aabbMax.val.simd = athena::simd<float>(-FLT_MAX); ret.aabbMax.val.simd = athena::simd<float>(-FLT_MAX);
for (const auto& f : island_faces) { for (const auto& f : island_faces) {
for (const auto& l : faces[f].loops) { for (const auto l : faces[f].loops) {
const Vertex& v = verts[loops[l].vert]; const Vertex& v = verts[loops[l].vert];
for (int c = 0; c < 3; ++c) { for (int c = 0; c < 3; ++c) {
if (v.co.val.simd[c] < ret.aabbMin.val.simd[c]) if (v.co.val.simd[c] < ret.aabbMin.val.simd[c])
@ -357,7 +357,7 @@ void MeshOptimizer::optimize(Mesh& mesh, int max_skin_banks) const {
continue; continue;
if (b_skin.size()) { if (b_skin.size()) {
bool brk = false; bool brk = false;
for (const auto& l : faces[f].loops) { for (const auto l : faces[f].loops) {
const Vertex& v = verts[loops[l].vert]; const Vertex& v = verts[loops[l].vert];
uint32_t skin_idx = get_skin_idx(v); uint32_t skin_idx = get_skin_idx(v);
if (skin_slot_set.find(skin_idx) == skin_slot_set.end()) { if (skin_slot_set.find(skin_idx) == skin_slot_set.end()) {