From c9dfa30af51b61dace5a249f1ff70b111d8945d3 Mon Sep 17 00:00:00 2001 From: Irlan <-> Date: Mon, 23 Apr 2018 01:11:09 -0300 Subject: [PATCH] check, goto --- src/bounce/quickhull/qh_hull.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/bounce/quickhull/qh_hull.cpp b/src/bounce/quickhull/qh_hull.cpp index c3672bc..41569e1 100644 --- a/src/bounce/quickhull/qh_hull.cpp +++ b/src/bounce/quickhull/qh_hull.cpp @@ -610,6 +610,12 @@ bool qhHull::MergeFace(qhFace* rightFace) { qhFace* leftFace = e->twin->face; + if (leftFace == rightFace) + { + e = e->next; + continue; + } + float32 d1 = b3Distance(leftFace->center, rightFace->plane); float32 d2 = b3Distance(rightFace->center, leftFace->plane); @@ -617,15 +623,11 @@ bool qhHull::MergeFace(qhFace* rightFace) { // Convex e = e->next; + continue; } else { // Concave or coplanar - if (leftFace == rightFace) - { - e = e->next; - continue; - } // Move left vertices into right qhVertex* v = leftFace->conflictList.head;