mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Don't return first_point() and last_point() by reference
This commit is contained in:
parent
0ffb0f6a58
commit
275422fac7
12 changed files with 28 additions and 42 deletions
|
@ -15,15 +15,15 @@ ExtrusionPath::reverse()
|
|||
}
|
||||
|
||||
Point*
|
||||
ExtrusionPath::first_point()
|
||||
ExtrusionPath::first_point() const
|
||||
{
|
||||
return &(this->polyline.points.front());
|
||||
return new Point(this->polyline.points.front());
|
||||
}
|
||||
|
||||
Point*
|
||||
ExtrusionPath::last_point()
|
||||
ExtrusionPath::last_point() const
|
||||
{
|
||||
return &(this->polyline.points.back());
|
||||
return new Point(this->polyline.points.back());
|
||||
}
|
||||
|
||||
ExtrusionLoop*
|
||||
|
@ -66,15 +66,15 @@ ExtrusionLoop::reverse()
|
|||
}
|
||||
|
||||
Point*
|
||||
ExtrusionLoop::first_point()
|
||||
ExtrusionLoop::first_point() const
|
||||
{
|
||||
return &(this->polygon.points.front());
|
||||
return new Point(this->polygon.points.front());
|
||||
}
|
||||
|
||||
Point*
|
||||
ExtrusionLoop::last_point()
|
||||
ExtrusionLoop::last_point() const
|
||||
{
|
||||
return &(this->polygon.points.front()); // in polygons, first == last
|
||||
return new Point(this->polygon.points.front()); // in polygons, first == last
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue