mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-22 23:59:34 +02:00
poly2d/f2d_tri_holes.cpp (find_point): don't loop forever on closed polygons
This commit is contained in:
parent
d758359791
commit
d0b5696a07
@ -169,11 +169,15 @@ void insert_polygon(CDT &cdt, const Polygon_2 &polygon)
|
||||
|
||||
static const struct v2d *find_point(const struct p2d *p, double x, double y)
|
||||
{
|
||||
const struct v2d *v;
|
||||
const struct v2d *v = p->v;
|
||||
|
||||
for (v = p->v; v; v = v->next)
|
||||
while (v) {
|
||||
if (v->x == x && v->y == y)
|
||||
break;
|
||||
v = v->next;
|
||||
if (v == p->v)
|
||||
return NULL;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user