From c1e7fac2f5634970fd8b8765fc7d09764278ea1b Mon Sep 17 00:00:00 2001 From: Panagiotis Cheilaris Date: Fri, 16 May 2014 14:19:24 +0200 Subject: [PATCH] rearrange some compute_sss endp tests in ring Signed-off-by: Panagiotis Cheilaris --- .../Voronoi_vertex_ring_C2.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h index 639f7808d64..b709b46b66f 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h @@ -866,13 +866,16 @@ private: r.is_segment() ); v_type = SSS; + const bool is_psrc_q = is_endpoint_of(p.source_site(), q); + const bool is_psrc_r = is_endpoint_of(p.source_site(), r); + const bool is_ptrg_q = is_endpoint_of(p.target_site(), q); + const bool is_ptrg_r = is_endpoint_of(p.target_site(), r); + uz_ = RT(1); - if (is_endpoint_of(p.source_site(), q) and - is_endpoint_of(p.source_site(), r) ) { + if (is_psrc_q and is_psrc_r) { ux_ = p.source().x(); uy_ = p.source().y(); - } else if (is_endpoint_of(p.target_site(), q) and - is_endpoint_of(p.target_site(), r) ) { + } else if (is_ptrg_q and is_ptrg_r) { ux_ = p.target().x(); uy_ = p.target().y(); } else {