From 944100110d8f168db3a26d26d3757819f463fdbc Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 31 Mar 2024 12:15:47 +0100 Subject: Don't save original face handles Not required, likely to change anyway. --- game/geoData.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'game') diff --git a/game/geoData.cpp b/game/geoData.cpp index 2339195..af7d006 100644 --- a/game/geoData.cpp +++ b/game/geoData.cpp @@ -395,14 +395,10 @@ GeoData::setHeights(const std::span triangleStrip) return add_vertex(tsVert); }); // Create new faces - std::vector newFaces; - newFaces.reserve(newVerts.size() - 2); - std::transform( - strip_begin(newVerts), strip_end(newVerts), std::back_inserter(newFaces), [this](const auto & newVert) { - const auto [a, b, c] = newVert; - auto faceHandle = add_face(a, b, c); - return faceHandle; - }); + std::for_each(strip_begin(newVerts), strip_end(newVerts), [this](const auto & newVert) { + const auto [a, b, c] = newVert; + add_face(a, b, c); + }); // Extrude corners struct Extrusion { -- cgit v1.2.3