From 8a5a0b672642e2490a86fd7e1b08cee3b7f3a9b4 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 25 Jan 2015 17:30:55 +0100 Subject: [PATCH] Minor optimization in TriangleMesh code --- xs/src/libslic3r/TriangleMesh.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xs/src/libslic3r/TriangleMesh.cpp b/xs/src/libslic3r/TriangleMesh.cpp index 4e620a7f7..89116f17b 100644 --- a/xs/src/libslic3r/TriangleMesh.cpp +++ b/xs/src/libslic3r/TriangleMesh.cpp @@ -700,16 +700,16 @@ TriangleMeshSlicer::make_loops(std::vector &lines, Polygons* l // find a line starting where last one finishes IntersectionLine* next_line = NULL; if (loop.back()->edge_b_id != -1) { - IntersectionLinePtrs* candidates = &(by_edge_a_id[loop.back()->edge_b_id]); - for (IntersectionLinePtrs::iterator lineptr = candidates->begin(); lineptr != candidates->end(); ++lineptr) { + IntersectionLinePtrs &candidates = by_edge_a_id[loop.back()->edge_b_id]; + for (IntersectionLinePtrs::iterator lineptr = candidates.begin(); lineptr != candidates.end(); ++lineptr) { if ((*lineptr)->skip) continue; next_line = *lineptr; break; } } if (next_line == NULL && loop.back()->b_id != -1) { - IntersectionLinePtrs* candidates = &(by_a_id[loop.back()->b_id]); - for (IntersectionLinePtrs::iterator lineptr = candidates->begin(); lineptr != candidates->end(); ++lineptr) { + IntersectionLinePtrs &candidates = by_a_id[loop.back()->b_id]; + for (IntersectionLinePtrs::iterator lineptr = candidates.begin(); lineptr != candidates.end(); ++lineptr) { if ((*lineptr)->skip) continue; next_line = *lineptr; break;