mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 10:11:10 -06:00
Many changes and fixes to remove leaks and return objects by reference
This commit is contained in:
parent
275422fac7
commit
a49dc603cc
27 changed files with 67 additions and 46 deletions
|
|
@ -8,18 +8,17 @@ Polyline::last_point() const
|
|||
return new Point(this->points.back());
|
||||
}
|
||||
|
||||
Lines
|
||||
Polyline::lines()
|
||||
void
|
||||
Polyline::lines(Lines &lines) const
|
||||
{
|
||||
Lines lines;
|
||||
lines.clear();
|
||||
for (int i = 0; i < this->points.size()-1; i++) {
|
||||
lines.push_back(Line(this->points[i], this->points[i+1]));
|
||||
}
|
||||
return lines;
|
||||
}
|
||||
|
||||
SV*
|
||||
Polyline::to_SV_ref() const
|
||||
Polyline::to_SV_ref()
|
||||
{
|
||||
SV* sv = newSV(0);
|
||||
sv_setref_pv( sv, "Slic3r::Polyline::Ref", (void*)this );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue