AROTBuilder: Collapse manual loops into ranged for loops

Same behavior, minus the induction variable to follow
This commit is contained in:
Lioncash 2020-03-31 07:29:21 -04:00
parent 84141eeb25
commit da4b1d5e7d
1 changed files with 4 additions and 4 deletions

View File

@ -384,10 +384,10 @@ std::pair<std::unique_ptr<uint8_t[]>, uint32_t> AROTBuilder::buildCol(const ColM
triBoxes.reserve(mesh.trianges.size()); triBoxes.reserve(mesh.trianges.size());
for (const ColMesh::Triangle& tri : mesh.trianges) { for (const ColMesh::Triangle& tri : mesh.trianges) {
zeus::CAABox& aabb = triBoxes.emplace_back(); zeus::CAABox& aabb = triBoxes.emplace_back();
for (size_t e = 0; e < tri.edges.size(); ++e) { for (const u32 edgeIdx : tri.edges) {
const ColMesh::Edge& edge = mesh.edges[tri.edges[e]]; const ColMesh::Edge& edge = mesh.edges[edgeIdx];
for (size_t v = 0; v < edge.verts.size(); ++v) { for (const u32 vertIdx : edge.verts) {
const auto& vert = mesh.verts[edge.verts[v]]; const auto& vert = mesh.verts[vertIdx];
aabb.accumulateBounds(zeus::CVector3f(vert)); aabb.accumulateBounds(zeus::CVector3f(vert));
} }
} }