Skip to content

Commit

Permalink
early return
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Vasudeo Desai committed Oct 20, 2024
1 parent 9526bae commit 22208fc
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions vector/v.hull/chull.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,18 +687,18 @@ void CleanEdges(void)
e = edges;
DELETE(edges, e);
}
if (edges) {
e = edges->next;
do {
if (e->delete) {
t = e;
e = e->next;
DELETE(edges, t);
}
else
e = e->next;
} while (e != edges);
}
if (!edges)
return;
e = edges->next;
do {
if (e->delete) {
t = e;
e = e->next;
DELETE(edges, t);
}
else
e = e->next;
} while (e != edges);
}

/*---------------------------------------------------------------------
Expand All @@ -713,6 +713,8 @@ void CleanFaces(void)
f = faces;
DELETE(faces, f);
}
if (!faces)
return;
f = faces->next;
do {
if (f->visible) {
Expand Down Expand Up @@ -748,6 +750,8 @@ void CleanVertices(void)
v = vertices;
DELETE(vertices, v);
}
if (!vertices)
return;
v = vertices->next;
do {
if (v->mark && !v->onhull) {
Expand Down

0 comments on commit 22208fc

Please sign in to comment.