From da4b1d5e7d4e0bb780026dd5f792e7398d07ec84 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 31 Mar 2020 07:29:21 -0400 Subject: [PATCH] AROTBuilder: Collapse manual loops into ranged for loops Same behavior, minus the induction variable to follow --- DataSpec/DNACommon/AROTBuilder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DataSpec/DNACommon/AROTBuilder.cpp b/DataSpec/DNACommon/AROTBuilder.cpp index 26eb45743..8372502d3 100644 --- a/DataSpec/DNACommon/AROTBuilder.cpp +++ b/DataSpec/DNACommon/AROTBuilder.cpp @@ -384,10 +384,10 @@ std::pair, uint32_t> AROTBuilder::buildCol(const ColM triBoxes.reserve(mesh.trianges.size()); for (const ColMesh::Triangle& tri : mesh.trianges) { zeus::CAABox& aabb = triBoxes.emplace_back(); - for (size_t e = 0; e < tri.edges.size(); ++e) { - const ColMesh::Edge& edge = mesh.edges[tri.edges[e]]; - for (size_t v = 0; v < edge.verts.size(); ++v) { - const auto& vert = mesh.verts[edge.verts[v]]; + for (const u32 edgeIdx : tri.edges) { + const ColMesh::Edge& edge = mesh.edges[edgeIdx]; + for (const u32 vertIdx : edge.verts) { + const auto& vert = mesh.verts[vertIdx]; aabb.accumulateBounds(zeus::CVector3f(vert)); } }