From 8ccce4c536ea7c3e04f1a15d34e6ca362ae84bf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 29 Sep 2023 11:19:52 +0200 Subject: [PATCH] Avoid one useless facet check This doesn't bring any speed-up because it was a very fast exit in push_facet(): the neighbor was necessarily outside (since we come from it), and we are done. --- .../include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h index a7130c2a377..2174363240b 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h @@ -1355,15 +1355,16 @@ private: } } } - else + else // no need for a Steiner point, carve through and continue { // tag neighbor as OUTSIDE neighbor->is_outside() = true; // for each finite facet of neighbor, push it to the queue - for(int i=0; i<4; ++i) + const int mi = m_tr.mirror_index(ch, s); + for(int i=1; i<4; ++i) { - const Facet neighbor_f = std::make_pair(neighbor, i); + const Facet neighbor_f = std::make_pair(neighbor, (mi+i)&3); push_facet(neighbor_f); } }