From b26a46a852242ba00bddde1b23aadd74d3e53e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 26 Oct 2021 11:15:03 +0200 Subject: [PATCH] fix warnings --- .../CGAL/Intersections_2/Segment_2_Segment_2.h | 16 ++++++++-------- .../Intersections_2/test_intersections_2.cpp | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h index eeff672e407..9d88487598e 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h @@ -76,7 +76,7 @@ S2S2_inter_info seg_seg_do_intersect_crossing( const typename K::Point_2& p1, const typename K::Point_2& p2, const typename K::Point_2& p3, const typename K::Point_2& p4, - int i1, int i2, int i3, int i4, + int /* i1 */, int i2, int i3, int /* i4 */, const K& k, bool extra_test) { switch (make_certain(k.orientation_2_object()(p1,p2,p3))) { @@ -88,7 +88,7 @@ seg_seg_do_intersect_crossing( return S2S2_inter_info(i2); case RIGHT_TURN: return S2S2_inter_info(false); - case LEFT_TURN: + default: // LEFT_TURN return S2S2_inter_info(true); } } @@ -100,11 +100,11 @@ seg_seg_do_intersect_crossing( return S2S2_inter_info(i2); case RIGHT_TURN: return S2S2_inter_info(true); - case LEFT_TURN: + default: // LEFT_TURN return S2S2_inter_info(false); } } - case COLLINEAR: + default: //COLLINEAR if (extra_test && k.collinear_2_object()(p3,p4,p2)) return S2S2_inter_info(i3, i2); return S2S2_inter_info(i3); @@ -131,7 +131,7 @@ S2S2_inter_info seg_seg_do_intersect_contained( const typename K::Point_2& p1, const typename K::Point_2& p2, const typename K::Point_2& p3, const typename K::Point_2& p4, - int i1, int i2, int i3, int i4, + int /* i1 */, int /* i2 */, int i3, int i4, const K& k, bool extra_test) { switch (make_certain(k.orientation_2_object()(p1,p2,p3))) { @@ -143,7 +143,7 @@ seg_seg_do_intersect_contained( return S2S2_inter_info(i4); case RIGHT_TURN: return S2S2_inter_info(true); - case LEFT_TURN: + default: // LEFT_TURN return S2S2_inter_info(false); } } @@ -155,11 +155,11 @@ seg_seg_do_intersect_contained( return S2S2_inter_info(i4); case RIGHT_TURN: return S2S2_inter_info(false); - case LEFT_TURN: + default: // LEFT_TURN return S2S2_inter_info(true); } } - case COLLINEAR: + default: // COLLINEAR if (extra_test && k.collinear_2_object()(p3,p4,p2)) return S2S2_inter_info(i3, i4); return S2S2_inter_info(i3); diff --git a/Intersections_2/test/Intersections_2/test_intersections_2.cpp b/Intersections_2/test/Intersections_2/test_intersections_2.cpp index 1d0f89180e1..40c55d26c66 100644 --- a/Intersections_2/test/Intersections_2/test_intersections_2.cpp +++ b/Intersections_2/test/Intersections_2/test_intersections_2.cpp @@ -433,10 +433,10 @@ struct Test check_intersection (S(p( 1, 10), p( 1, 2)), S(p( 1, 7), p( 1, 3)), S(P( 1, 3), P( 1, 7))); // exact point intersection - check_intersection (S(p( 3.14, 0), p( 3.14, 10)), S(p( 3.14, 3.456), p( 5, 10)), p( 3.14, 3.456)); - check_intersection (S(p( 3.14, 0), p( 3.14, 10)), S(p( 5, 10), p( 3.14, 3.456)), p( 3.14, 3.456)); - check_intersection (S(p( 3.14, 0), p( 3.14, 10)), S(p( 3.14, 3.456), p( -5, 10)), p( 3.14, 3.456)); - check_intersection (S(p( 3.14, 0), p( 3.14, 10)), S(p( -5, 10), p( 3.14, 3.456)), p( 3.14, 3.456)); + check_intersection (S(p( 3, 0), p( 3, 10)), S(p( 3, 3), p( 5, 10)), p( 3, 3)); + check_intersection (S(p( 3, 0), p( 3, 10)), S(p( 5, 10), p( 3, 3)), p( 3, 3)); + check_intersection (S(p( 3, 0), p( 3, 10)), S(p( 3, 3), p( -5, 10)), p( 3, 3)); + check_intersection (S(p( 3, 0), p( 3, 10)), S(p( -5, 10), p( 3, 3)), p( 3, 3)); check_intersection (S(p( 0, 0), p( 44, 44)), S(p( 44, 44), p( 55, 55)), p( 44, 44)); check_intersection (S(p( 0, 0), p( 44, 44)), S(p( 55, 55), p( 44, 44)), p( 44, 44)); check_intersection (S(p( 44, 44), p( 0, 0)), S(p( 44, 44), p( 55, 55)), p( 44, 44));