From 47a824d1310b83ffb7156e98d4698bc4e30eb1a3 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Mon, 9 Jan 2023 15:23:55 +0100 Subject: [PATCH] Remove unused member in DefaultSupportTree Also fix for loop that is copying int vector in each iteration --- src/libslic3r/SLA/DefaultSupportTree.cpp | 3 +-- src/libslic3r/SLA/DefaultSupportTree.hpp | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libslic3r/SLA/DefaultSupportTree.cpp b/src/libslic3r/SLA/DefaultSupportTree.cpp index 53475542ac..a0a12d32b0 100644 --- a/src/libslic3r/SLA/DefaultSupportTree.cpp +++ b/src/libslic3r/SLA/DefaultSupportTree.cpp @@ -372,7 +372,6 @@ void DefaultSupportTree::add_pinheads() PtIndices filtered_indices; filtered_indices.reserve(aliases.size()); m_iheads.reserve(aliases.size()); - m_iheadless.reserve(aliases.size()); for(auto& a : aliases) { // Here we keep only the front point of the cluster. filtered_indices.emplace_back(a.front()); @@ -602,7 +601,7 @@ void DefaultSupportTree::routing_to_ground() // sidepoints with the cluster centroid (which is a ground pillar) // or a nearby pillar if the centroid is unreachable. size_t ci = 0; - for (auto cl : m_pillar_clusters) { + for (const std::vector &cl : m_pillar_clusters) { m_thr(); auto cidx = cl_centroids[ci++]; diff --git a/src/libslic3r/SLA/DefaultSupportTree.hpp b/src/libslic3r/SLA/DefaultSupportTree.hpp index ee58e9dede..08990a8df9 100644 --- a/src/libslic3r/SLA/DefaultSupportTree.hpp +++ b/src/libslic3r/SLA/DefaultSupportTree.hpp @@ -62,7 +62,6 @@ class DefaultSupportTree { PtIndices m_iheads; // support points with pinhead PtIndices m_iheads_onmodel; - PtIndices m_iheadless; // headless support points std::map m_head_to_ground_scans;