From c131d174c9c5f8c631005e30d30dcd84c58bfbca Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 21 May 2012 15:12:22 +0000 Subject: [PATCH] yet one more change --- Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h | 10 ---------- .../CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h | 9 ++++++--- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h index 06bbd88733f..7b8df018632 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h @@ -801,16 +801,6 @@ protected: return false; } - inline - bool is_hidden(const Edge& e, const Site_2& q, Tag_true) const - { - Vertex_handle v1( e.first->vertex(ccw(e.second)) ); - Vertex_handle v2( e.first->vertex( cw(e.second)) ); - if ( is_infinite(v1) || is_infinite(v2) ) { return false; } - - return geom_traits().is_hidden_2_object()(v1->site(), v2->site(), q); - } - // returns: // ON_POSITIVE_SIDE if q is closer to p1 // ON_NEGATIVE_SIDE if q is closer to p2 diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h index 9f552f0b6c5..6509e7e207f 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h @@ -655,9 +655,12 @@ insert(const Site_2& p, Vertex_handle vnear) e = *ec; if ( Geom_traits::Is_hidden_2::Has_three_argument_operator ) { - if ( is_hidden(e, p, Hidden_predicate_tag()) ) { - e.first->vertex( ccw(e.second) )->add_hidden_site(p); - e.first->vertex( cw(e.second) )->add_hidden_site(p); + Vertex_handle v1( e.first->vertex(ccw(e.second)) ); + Vertex_handle v2( e.first->vertex( cw(e.second)) ); + if ( !is_infinite(v1) && !is_infinite(v2) && + is_hidden(v1->site(), v2->site(), p, Hidden_predicate_tag()) ) { + v1->add_hidden_site(p); + v2->add_hidden_site(p); return Vertex_handle(); } }