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
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue