From 5f0fbcef6dbc1421ea2b538c7f839b2f37c6e36e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 20 Mar 2023 00:11:43 +0000 Subject: Fix some name shadowing in FaceController --- assetFactory/faceController.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assetFactory/faceController.cpp b/assetFactory/faceController.cpp index 2fb0412..1e563b2 100644 --- a/assetFactory/faceController.cpp +++ b/assetFactory/faceController.cpp @@ -52,9 +52,9 @@ FaceController::apply(ModelFactoryMesh & mesh, const StyleStack & parents, const const auto next = (idx + 1) % vertexCount; const auto newFace = mesh.add_face({baseVertices[idx], baseVertices[next], vertices[next], vertices[idx]}); - auto & name = mesh.property(mesh.nameFaceProperty, newFace); - name = getAdjacentFaceName(ofrange, newFace); - newFaces.emplace(name, newFace); + auto & newFaceName = mesh.property(mesh.nameFaceProperty, newFace); + newFaceName = getAdjacentFaceName(ofrange, newFace); + newFaces.emplace(newFaceName, newFace); } newFaces.emplace(name, mesh.add_face(vertices)); if (smooth) { @@ -63,8 +63,8 @@ FaceController::apply(ModelFactoryMesh & mesh, const StyleStack & parents, const } } applyStyle(mesh, parents + this, newFaces); - for (const auto & [name, faceController] : faceControllers) { - faceController->apply(mesh, parents + this, name, newFaces); + for (const auto & [subFaceName, faceController] : faceControllers) { + faceController->apply(mesh, parents + this, subFaceName, newFaces); } faces.merge(std::move(newFaces)); } -- cgit v1.2.3