From 377a8895c5ba61712d0aac3cd8de56ff98a34a7b Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Dey Date: Sat, 29 Sep 2012 11:25:41 +0200 Subject: [PATCH] minor changes ternary operator ? is changed into if-else Line 887 in Finite edge conflict assertions of horizontal and vertical segment is added in Line 1050 in Basic predicate --- .../Basic_predicates_C2.h | 2 ++ .../Finite_edge_interior_conflict_C2.h | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h b/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h index 935e2c33163..9425fc0e2b3 100644 --- a/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h +++ b/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h @@ -1047,6 +1047,8 @@ public: { CGAL_assertion( t.is_segment() ); CGAL_assertion( s.is_segment() ); + CGAL_assertion(not s.segment().is_horizontal() + and not s.segment().is_vertical()); //need to add assertion for s not hor and not ver //and (not s.is_horizontal()) //and (not s.is_vertical()) ); diff --git a/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h b/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h index 408823ce3f0..f661bfe124a 100644 --- a/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h +++ b/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h @@ -883,10 +883,16 @@ public: //intersects_segment_interior_inf_wedge_sp // then return false if (t.is_segment()) { - if(p.is_point() ? intersects_segment_interior_inf_wedge_sp(q,p,t) - : intersects_segment_interior_inf_wedge_sp(p,q,t) - == false) - return false; + bool result; + if(p.is_point()) { + result = intersects_segment_interior_inf_wedge_sp(q,p,t); + } else { + result = intersects_segment_interior_inf_wedge_sp(p,q,t); + } + + if (result == false) { + return false; + } } // philaris: tocheck std::cout << "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("