From d8a6478b57dc0c9965b322375b17fb4a6a8af744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 16 Aug 2023 09:02:28 +0200 Subject: [PATCH] remove another use of deprecated API --- .../include/CGAL/CGAL_Ipelet_base_v7.h | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h index 276e5d5c651..5373b0a3445 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h @@ -822,41 +822,34 @@ public: CGAL::Cartesian_converter conv; Exact_circle_2 exact_circle=conv(approx_circle); + typedef std::pair Cp2_mult; SK::Intersect_2 inter=SK().intersect_2_object(); - std::vector< std::pair > points; + std::vector< Cp2_mult > points; points.reserve(8); - std::vector ints; + std::vector< Cp2_mult > ints; ints.reserve(2); - std::pair tmp_pt; int indices[8]={-1,-1,-1,-1,-1,-1,-1,-1}; for (unsigned i=0;i!=4;++i){ ints.clear(); SK::Segment_2 S(conv(bbox[i]),conv(bbox[(i+1)%4])); - inter(exact_circle,SK::Line_arc_2(S),std::back_inserter(ints)); + inter(exact_circle,SK::Line_arc_2(S),dispatch_or_drop_output(std::back_inserter(ints))); unsigned index=0; - bool ok=true; switch (ints.size()){ case 1: - ok=CGAL::assign(tmp_pt,ints[0]); - CGAL_assertion(ok); CGAL_USE(ok); - points.push_back(tmp_pt); + points.push_back(ints[0]); index=points.size()-1; indices[i]=index; indices[(i+1)%4+4]=index; break; case 2: int right_ind=i<2?0:1; - ok=CGAL::assign(tmp_pt,ints[right_ind]); - CGAL_assertion(ok); CGAL_USE(ok); - points.push_back(tmp_pt); + points.push_back(ints[right_ind]); index=points.size()-1; indices[i]=index; - ok=CGAL::assign(tmp_pt,ints[(right_ind+1)%2]); - CGAL_assertion(ok); CGAL_USE(ok); - points.push_back(tmp_pt); + points.push_back(ints[(right_ind+1)%2]); index=points.size()-1; indices[(i+1)%4+4]=index; break;