mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Refactored signatures of many C++ methods for more efficient and safer style. Includes a bugfix for Point::nearest_point() which was returning a pointer to freed memory. #1961
This commit is contained in:
parent
6201aacf88
commit
ca4d4211c9
30 changed files with 203 additions and 161 deletions
|
@ -43,16 +43,16 @@ ExtrusionPath::reverse()
|
|||
this->polyline.reverse();
|
||||
}
|
||||
|
||||
Point*
|
||||
Point
|
||||
ExtrusionPath::first_point() const
|
||||
{
|
||||
return new Point(this->polyline.points.front());
|
||||
return this->polyline.points.front();
|
||||
}
|
||||
|
||||
Point*
|
||||
Point
|
||||
ExtrusionPath::last_point() const
|
||||
{
|
||||
return new Point(this->polyline.points.back());
|
||||
return this->polyline.points.back();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -200,16 +200,16 @@ ExtrusionLoop::reverse()
|
|||
// no-op
|
||||
}
|
||||
|
||||
Point*
|
||||
Point
|
||||
ExtrusionLoop::first_point() const
|
||||
{
|
||||
return new Point(this->polygon.points.front());
|
||||
return this->polygon.points.front();
|
||||
}
|
||||
|
||||
Point*
|
||||
Point
|
||||
ExtrusionLoop::last_point() const
|
||||
{
|
||||
return new Point(this->polygon.points.front()); // in polygons, first == last
|
||||
return this->polygon.points.front(); // in polygons, first == last
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue