mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-03 18:27:59 -05:00
Don't return first_point() and last_point() by reference
This commit is contained in:
1 parent
0ffb0f6a58
commit
275422fac7
12 files changed
+28
-42
No files matched your search
@@ -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