mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 02:01:12 -06:00
Minor optimizations
This commit is contained in:
parent
6e22a82e7d
commit
4dce461aaf
8 changed files with 31 additions and 30 deletions
|
|
@ -8,13 +8,15 @@ Polyline::last_point() const
|
|||
return new Point(this->points.back());
|
||||
}
|
||||
|
||||
void
|
||||
Polyline::lines(Lines &lines) const
|
||||
Lines
|
||||
Polyline::lines() const
|
||||
{
|
||||
lines.clear();
|
||||
for (int i = 0; i < this->points.size()-1; i++) {
|
||||
lines.push_back(Line(this->points[i], this->points[i+1]));
|
||||
Lines lines;
|
||||
lines.reserve(this->points.size() - 1);
|
||||
for (Points::const_iterator it = this->points.begin(); it != this->points.end()-1; ++it) {
|
||||
lines.push_back(Line(*it, *(it + 1)));
|
||||
}
|
||||
return lines;
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue