C++11 beautification of loops.
This commit is contained in:
parent
47543cf82a
commit
ef2cfdb0d1
@ -83,16 +83,16 @@ Layer::make_slices()
|
|||||||
// prepare ordering points
|
// prepare ordering points
|
||||||
Points ordering_points;
|
Points ordering_points;
|
||||||
ordering_points.reserve(slices.size());
|
ordering_points.reserve(slices.size());
|
||||||
for (ExPolygons::const_iterator ex = slices.begin(); ex != slices.end(); ++ex)
|
for (const ExPolygon &ex : slices)
|
||||||
ordering_points.push_back(ex->contour.first_point());
|
ordering_points.push_back(ex.contour.first_point());
|
||||||
|
|
||||||
// sort slices
|
// sort slices
|
||||||
std::vector<Points::size_type> order;
|
std::vector<Points::size_type> order;
|
||||||
Slic3r::Geometry::chained_path(ordering_points, order);
|
Slic3r::Geometry::chained_path(ordering_points, order);
|
||||||
|
|
||||||
// populate slices vector
|
// populate slices vector
|
||||||
for (std::vector<Points::size_type>::const_iterator it = order.begin(); it != order.end(); ++it)
|
for (size_t i : order)
|
||||||
this->slices.expolygons.push_back(STDMOVE(slices[*it]));
|
this->slices.expolygons.push_back(STDMOVE(slices[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user