mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-15 01:22:37 -07:00
Don't return first_point() and last_point() by reference
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user