mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00: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:
@@ -76,10 +76,10 @@ ExPolygon::is_valid() const
|
||||
}
|
||||
|
||||
bool
|
||||
ExPolygon::contains_line(const Line* line) const
|
||||
ExPolygon::contains_line(const Line &line) const
|
||||
{
|
||||
Polylines pl;
|
||||
pl.push_back(*line);
|
||||
pl.push_back(line);
|
||||
|
||||
Polylines pl_out;
|
||||
diff(pl, *this, pl_out);
|
||||
@@ -87,7 +87,7 @@ ExPolygon::contains_line(const Line* line) const
|
||||
}
|
||||
|
||||
bool
|
||||
ExPolygon::contains_point(const Point* point) const
|
||||
ExPolygon::contains_point(const Point &point) const
|
||||
{
|
||||
if (!this->contour.contains_point(point)) return false;
|
||||
for (Polygons::const_iterator it = this->holes.begin(); it != this->holes.end(); ++it) {
|
||||
|
||||
Reference in New Issue
Block a user