diff --git a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp index 1502fb44db2..b7192481138 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp +++ b/Circular_kernel_3/demo/Circular_kernel_3/Viewer.cpp @@ -893,20 +893,19 @@ void Viewer::naive_compute_intersection_points(const std::vector& for (std::vector::const_iterator it_f=circles.begin();it_f!=--circles.end();++it_f){ std::vector::const_iterator it_s=it_f; ++it_s; + typedef std::pair Point_and_multiplicity; for (;it_s!=circles.end();++it_s){ - std::vector intersections; + std::vector intersections; //ensure_circles are different CGAL_precondition(*it_s!=*it_f); - CGAL::intersection(*it_f,*it_s,std::back_inserter(intersections)); + CGAL::intersection(*it_f,*it_s,CGAL::dispatch_or_drop_output(std::back_inserter(intersections))); if (!intersections.empty()){ - for (std::vector ::const_iterator it_pt=intersections.begin();it_pt!=intersections.end();++it_pt){ - const std::pair* pt= - CGAL::object_cast< std::pair > (&(*it_pt)); - assert(pt!=nullptr); - *out++=EPIC::Point_3( CGAL::to_double(pt->first.x()), - CGAL::to_double(pt->first.y()), - CGAL::to_double(pt->first.z()) - ); + for (const Point_and_multiplicity& pt : intersections) + { + *out++=EPIC::Point_3( CGAL::to_double(pt.first.x()), + CGAL::to_double(pt.first.y()), + CGAL::to_double(pt.first.z()) + ); } } }