diff --git a/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h b/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h index 8cd451c6d9e..bfde9e77409 100644 --- a/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h +++ b/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h @@ -350,20 +350,20 @@ intersection(const typename K::Triangle_2 &tr1, const typename K::Triangle_2 &tr2, const K&) { - typedef Triangle_2_Triangle_2_pair is_t; - is_t ispair(&tr1, &tr2); + typedef Triangle_2_Triangle_2_pair Intersection_type; + Intersection_type ispair(&tr1, &tr2); switch (ispair.intersection_type()) { - case is_t::NO_INTERSECTION: + case Intersection_type::NO_INTERSECTION: default: return intersection_return(); - case is_t::POINT: + case Intersection_type::POINT: return intersection_return(ispair.intersection_point()); - case is_t::SEGMENT: + case Intersection_type::SEGMENT: return intersection_return(ispair.intersection_segment()); - case is_t::TRIANGLE: + case Intersection_type::TRIANGLE: return intersection_return(ispair.intersection_triangle()); - case is_t::POLYGON: + case Intersection_type::POLYGON: { typedef std::vector Container; Container points(ispair.vertex_count()); @@ -372,10 +372,7 @@ intersection(const typename K::Triangle_2 &tr1, if(Is_cw::Is_exact>()(points)) { - std::size_t length = points.size(); - - for(std::size_t i = 0; i< length/2; ++i) - std::swap(points[i], points[length-i-1]); + std::reverse(points.begin(), points.end()); } return intersection_return(points); diff --git a/Intersections_3/include/CGAL/Intersection_traits_3.h b/Intersections_3/include/CGAL/Intersection_traits_3.h index 6a626f21e23..7b82fda3e5b 100644 --- a/Intersections_3/include/CGAL/Intersection_traits_3.h +++ b/Intersections_3/include/CGAL/Intersection_traits_3.h @@ -173,8 +173,8 @@ struct Intersection_traits template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + boost::variant< typename K::Point_3 > variant_type; + typedef typename boost::optional< variant_type > result_type; }; // Iso_cuboid_3 Plane_3, variant of 4 @@ -182,7 +182,7 @@ template struct Intersection_traits { typedef typename boost::variant< typename K::Point_3, typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; @@ -191,7 +191,7 @@ template struct Intersection_traits { typedef typename boost::variant< typename K::Point_3, typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; @@ -201,7 +201,7 @@ template struct Intersection_traits { typedef typename boost::variant< typename K::Point_3, typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; @@ -210,7 +210,7 @@ template struct Intersection_traits { typedef typename boost::variant< typename K::Point_3, typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; @@ -220,7 +220,7 @@ template struct Intersection_traits { typedef typename boost::variant< typename K::Point_3, typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; @@ -229,7 +229,7 @@ template struct Intersection_traits { typedef typename boost::variant< typename K::Point_3, typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; @@ -239,7 +239,7 @@ template struct Intersection_traits { typedef typename boost::variant< typename K::Point_3, typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; @@ -248,7 +248,7 @@ template struct Intersection_traits { typedef typename boost::variant< typename K::Point_3, typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; @@ -379,7 +379,7 @@ struct Intersection_traits { typedef typename boost::variant< typename K::Point_3 , typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; @@ -389,7 +389,7 @@ struct Intersection_traits { typedef typename boost::variant< typename K::Point_3 , typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; @@ -399,7 +399,7 @@ struct Intersection_traits { typedef typename boost::variant< typename K::Point_3 , typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; @@ -409,7 +409,7 @@ struct Intersection_traits { typedef typename boost::variant< typename K::Point_3 , typename K::Segment_3, - typename K::Triangle_3, std::vector > variant_type; + typename K::Triangle_3, std::vector > variant_type; typedef typename boost::optional< variant_type > result_type; }; diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h index 76f9f725014..56ec7b5f9f5 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h @@ -151,8 +151,8 @@ intersection( case 2: //intersects diagonally { Poly res(4); - Segment_3 front(segments.front()), - back(segments.back()); + Segment_3 &front(segments.front()), + &back(segments.back()); res[0] = front.target(); res[1] = back.target(); res[2] = back.source(); @@ -311,13 +311,17 @@ intersection( } } } + if(tmp_segs.size() < 3) return result_type(); + std::list tmp_pts; fill_points_list(tmp_segs,tmp_pts); + Poly res; for(const auto& p : tmp_pts) res.push_back(p); + if(res.size() == 3){ typename K::Triangle_3 tr(res[0], res[1], res[2]); return result_type(std::forward(tr)); diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Segment_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Segment_3_intersection.h index bcf694cdc3c..a79424649f6 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Segment_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Segment_3_intersection.h @@ -32,7 +32,7 @@ struct Tetrahedron_segment_intersection_3 typedef typename K::Segment_3 O; typedef Tetrahedron_lines_intersection_3_base > Base; - typedef typename Base::Result_type Result_type; + typedef typename Base::Result_type result_type; Tetrahedron_segment_intersection_3(const typename K::Tetrahedron_3& tet, const O& o):Base(tet,o) {} @@ -43,7 +43,7 @@ struct Tetrahedron_segment_intersection_3 if(this->tet.has_on_bounded_side(this->o.source()) && this->tet.has_on_bounded_side(this->o.target())){ typename K::Segment_3 result = this->o; - this->output = Result_type(std::forward(result)); + this->output = result_type(std::forward(result)); return true; } return false; @@ -55,12 +55,12 @@ struct Tetrahedron_segment_intersection_3 if(this->tet.has_on_bounded_side(this->o.source())) { typename K::Segment_3 result(this->o.source(), this->res_points.front()); - this->output = Result_type(std::forward(result)); + this->output = result_type(std::forward(result)); return true; } else if(this->tet.has_on_bounded_side(this->o.target())){ typename K::Segment_3 result(this->res_points.front(), this->o.target()); - this->output = Result_type(std::forward(result)); + this->output = result_type(std::forward(result)); return true; } return false; diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h index e981d7298e0..243fa7185b4 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h @@ -110,9 +110,8 @@ intersection( fill_segments_infos(segments,tmp, tr); Poly res; res.reserve(4); - for( const auto& p : tmp){ + for(const auto& p : tmp) res.push_back(p); - } return result_type(std::forward(res)); } //else it must be adjacent to an vertex, so we return the point @@ -238,7 +237,8 @@ intersection( Poly res; res.reserve(4); res.push_back(inside_points.front()); - for( const auto& p : tmp){res.push_back(p);} + for(const auto& p : tmp) + res.push_back(p); return result_type(std::forward(res)); } else //size 2 @@ -256,7 +256,8 @@ intersection( res.push_back(inside_points.front()); } res.push_back(inside_points.back()); - for( const auto& p : tmp){res.push_back(p);} + for(const auto& p : tmp) + res.push_back(p); return result_type(std::forward(res)); } } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/intersection_3_1_impl.h b/Intersections_3/include/CGAL/Intersections_3/internal/intersection_3_1_impl.h index 4a3a52a2d93..a6eac72e415 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/intersection_3_1_impl.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/intersection_3_1_impl.h @@ -82,8 +82,8 @@ namespace internal { template typename Intersection_traits::result_type intersection(const typename K::Plane_3 &plane, - const typename K::Line_3 &line, - const K& /*k*/) + const typename K::Line_3 &line, + const K& /*k*/) { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; @@ -116,8 +116,8 @@ template inline typename Intersection_traits::result_type intersection(const typename K::Line_3 &line, - const typename K::Plane_3 &plane, - const K& k) + const typename K::Plane_3 &plane, + const K& k) { return intersection(plane, line, k); } @@ -125,8 +125,8 @@ intersection(const typename K::Line_3 &line, template typename Intersection_traits::result_type intersection(const typename K::Plane_3 &plane1, - const typename K::Plane_3 &plane2, - const K&) + const typename K::Plane_3 &plane2, + const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; @@ -187,9 +187,9 @@ boost::optional< boost::variant > intersection(const typename K::Plane_3 &plane1, - const typename K::Plane_3 &plane2, - const typename K::Plane_3 &plane3, - const K& k) + const typename K::Plane_3 &plane2, + const typename K::Plane_3 &plane3, + const K& k) { typedef typename boost::optional< @@ -238,8 +238,8 @@ intersection(const typename K::Plane_3 &plane1, template bool do_intersect(const typename K::Plane_3 &plane, - const typename K::Line_3 &line, - const K&) + const typename K::Line_3 &line, + const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; @@ -266,8 +266,8 @@ template inline bool do_intersect(const typename K::Line_3 &line, - const typename K::Plane_3 &plane, - const K& k) + const typename K::Plane_3 &plane, + const K& k) { return do_intersect(plane, line, k); } @@ -275,8 +275,8 @@ do_intersect(const typename K::Line_3 &line, template typename Intersection_traits::result_type intersection(const typename K::Line_3 &l1, - const typename K::Line_3 &l2, - const K&) + const typename K::Line_3 &l2, + const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; @@ -313,8 +313,8 @@ intersection(const typename K::Line_3 &l1, template bool do_intersect(const typename K::Line_3 &l1, - const typename K::Line_3 &l2, - const K&) + const typename K::Line_3 &l2, + const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; @@ -400,8 +400,8 @@ struct L_p_visitor : public boost::static_visitor< template typename Intersection_traits::result_type intersection(const typename K::Segment_3 &s1, - const typename K::Segment_3 &s2, - const K&) + const typename K::Segment_3 &s2, + const K&) { CGAL_precondition(! s1.is_degenerate () && ! s2.is_degenerate () ); @@ -450,8 +450,8 @@ do_intersect(const typename K::Segment_3 &s1, template typename Intersection_traits::result_type intersection(const typename K::Line_3 &l, - const typename K::Segment_3 &s, - const K& k) + const typename K::Segment_3 &s, + const K& k) { CGAL_precondition(! l.is_degenerate () && ! s.is_degenerate () ); @@ -474,8 +474,8 @@ intersection(const typename K::Line_3 &l, template typename Intersection_traits::result_type intersection(const typename K::Segment_3 &s, - const typename K::Line_3 &l, - const K& k) + const typename K::Line_3 &l, + const K& k) { return intersection(l,s,k); } @@ -519,8 +519,8 @@ template bool Ray_3_has_on_collinear_Point_3( const typename K::Ray_3 &r, - const typename K::Point_3 &p, - const K& k) + const typename K::Point_3 &p, + const K& k) { return k.equal_3_object()(r.source(),p) @@ -534,8 +534,8 @@ Ray_3_has_on_collinear_Point_3( template typename Intersection_traits::result_type intersection(const typename K::Line_3 &l, - const typename K::Ray_3 &r, - const K& k) + const typename K::Ray_3 &r, + const K& k) { CGAL_precondition(! l.is_degenerate () && ! r.is_degenerate () ); @@ -556,8 +556,8 @@ intersection(const typename K::Line_3 &l, template typename Intersection_traits::result_type intersection(const typename K::Ray_3 &r, - const typename K::Line_3 &l, - const K& k) + const typename K::Line_3 &l, + const K& k) { return intersection(l,r,k); } @@ -593,8 +593,8 @@ do_intersect(const typename K::Ray_3 &r, template typename Intersection_traits::result_type intersection(const typename K::Segment_3 &s, - const typename K::Ray_3 &r, - const K& k) + const typename K::Ray_3 &r, + const K& k) { CGAL_precondition(! s.is_degenerate () && ! r.is_degenerate () ); @@ -638,8 +638,8 @@ intersection(const typename K::Segment_3 &s, template typename Intersection_traits::result_type intersection(const typename K::Ray_3 &r, - const typename K::Segment_3 &s, - const K& k) + const typename K::Segment_3 &s, + const K& k) { return intersection(s,r,k); } @@ -681,8 +681,8 @@ do_intersect(const typename K::Ray_3 &r, template typename Intersection_traits::result_type intersection(const typename K::Ray_3 &r1, - const typename K::Ray_3 &r2, - const K& k) + const typename K::Ray_3 &r2, + const K& k) { CGAL_precondition(! r1.is_degenerate () && ! r2.is_degenerate () ); @@ -852,8 +852,8 @@ do_intersect(const typename K::Sphere_3 &s1, template typename Intersection_traits::result_type intersection(const typename K::Plane_3 &plane, - const typename K::Ray_3 &ray, - const K& k) + const typename K::Ray_3 &ray, + const K& k) { typedef typename K::Point_3 Point_3; @@ -879,8 +879,8 @@ template inline typename Intersection_traits::result_type intersection(const typename K::Ray_3 &ray, - const typename K::Plane_3 &plane, - const K& k) + const typename K::Plane_3 &plane, + const K& k) { return intersection(plane, ray, k); } @@ -890,8 +890,8 @@ intersection(const typename K::Ray_3 &ray, template bool do_intersect(const typename K::Plane_3 &plane, - const typename K::Ray_3 &ray, - const K& k) + const typename K::Ray_3 &ray, + const K& k) { typedef typename K::Point_3 Point_3; @@ -912,8 +912,8 @@ template inline bool do_intersect(const typename K::Ray_3 &ray, - const typename K::Plane_3 &plane, - const K& k) + const typename K::Plane_3 &plane, + const K& k) { return do_intersect(plane, ray, k); } @@ -922,8 +922,8 @@ do_intersect(const typename K::Ray_3 &ray, template typename Intersection_traits::result_type intersection(const typename K::Plane_3 &plane, - const typename K::Segment_3 &seg, - const K& k) + const typename K::Segment_3 &seg, + const K& k) { typedef typename K::Point_3 Point_3; const Point_3 &source = seg.source(); @@ -996,8 +996,8 @@ template inline typename Intersection_traits::result_type intersection(const typename K::Segment_3 &seg, - const typename K::Plane_3 &plane, - const K& k) + const typename K::Plane_3 &plane, + const K& k) { return intersection(plane, seg, k); } @@ -1006,8 +1006,8 @@ intersection(const typename K::Segment_3 &seg, template bool do_intersect(const typename K::Plane_3 &plane, - const typename K::Segment_3 &seg, - const K&) + const typename K::Segment_3 &seg, + const K&) { typedef typename K::Point_3 Point_3; const Point_3 &source = seg.source(); @@ -1028,8 +1028,8 @@ template inline bool do_intersect(const typename K::Segment_3 &seg, - const typename K::Plane_3 &plane, - const K& k) + const typename K::Plane_3 &plane, + const K& k) { return do_intersect(plane, seg, k); } @@ -1038,8 +1038,8 @@ template inline typename Intersection_traits::result_type intersection(const typename K::Plane_3 &plane, - const typename K::Triangle_3 &tri, - const K& k) + const typename K::Triangle_3 &tri, + const K& k) { typedef typename Intersection_traits::result_type @@ -1139,8 +1139,8 @@ template inline typename Intersection_traits::result_type intersection(const typename K::Triangle_3 &triangle, - const typename K::Plane_3 &plane, - const K& k) + const typename K::Plane_3 &plane, + const K& k) { return intersection(plane, triangle, k); } @@ -1148,8 +1148,8 @@ intersection(const typename K::Triangle_3 &triangle, template typename Intersection_traits::result_type intersection(const typename K::Line_3 &line, - const Bbox_3 &box, - const K&) + const Bbox_3 &box, + const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; @@ -1171,8 +1171,8 @@ template inline typename Intersection_traits::result_type intersection(const Bbox_3 &box, - const typename K::Line_3 &line, - const K& k) + const typename K::Line_3 &line, + const K& k) { return intersection(line, box, k); } @@ -1181,8 +1181,8 @@ intersection(const Bbox_3 &box, template typename Intersection_traits::result_type intersection(const typename K::Ray_3 &ray, - const Bbox_3 &box, - const K&) + const Bbox_3 &box, + const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; @@ -1204,8 +1204,8 @@ template inline typename Intersection_traits::result_type intersection(const Bbox_3 &box, - const typename K::Ray_3 &ray, - const K& k) + const typename K::Ray_3 &ray, + const K& k) { return intersection(ray, box, k); } @@ -1215,8 +1215,8 @@ intersection(const Bbox_3 &box, template typename Intersection_traits::result_type intersection(const typename K::Segment_3 &seg, - const Bbox_3 &box, - const K&) + const Bbox_3 &box, + const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; @@ -1238,8 +1238,8 @@ template inline typename Intersection_traits::result_type intersection(const Bbox_3 &box, - const typename K::Segment_3 &seg, - const K& k) + const typename K::Segment_3 &seg, + const K& k) { return intersection(seg, box, k); } @@ -1248,8 +1248,8 @@ template inline typename Intersection_traits::result_type intersection(const Bbox_3 &a, - const Bbox_3 &b, - const K&) + const Bbox_3 &b, + const K&) { return CGAL::intersection(a, b); } @@ -1257,8 +1257,8 @@ intersection(const Bbox_3 &a, template typename Intersection_traits::result_type intersection(const CGAL::Bbox_3 &box, - const typename K::Iso_cuboid_3 &cub, - const K&) + const typename K::Iso_cuboid_3 &cub, + const K&) { typename K::Iso_cuboid_3 iso_cub(box); return intersection(iso_cub, cub); @@ -1269,8 +1269,8 @@ template inline typename Intersection_traits::result_type intersection(const typename K::Iso_cuboid_3 &cub, - const CGAL::Bbox_3 &box, - const K& k) + const CGAL::Bbox_3 &box, + const K& k) { return intersection(box,cub, k); } @@ -1279,8 +1279,8 @@ intersection(const typename K::Iso_cuboid_3 &cub, template typename Intersection_traits::result_type intersection(const typename K::Line_3 &line, - const typename K::Iso_cuboid_3 &box, - const K&) + const typename K::Iso_cuboid_3 &box, + const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; @@ -1341,8 +1341,8 @@ template inline typename Intersection_traits::result_type intersection(const typename K::Iso_cuboid_3 &box, - const typename K::Line_3 &line, - const K& k) + const typename K::Line_3 &line, + const K& k) { return intersection(line, box, k); } @@ -1352,8 +1352,8 @@ intersection(const typename K::Iso_cuboid_3 &box, template typename Intersection_traits::result_type intersection(const typename K::Ray_3 &ray, - const typename K::Iso_cuboid_3 &box, - const K&) + const typename K::Iso_cuboid_3 &box, + const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; @@ -1413,8 +1413,8 @@ template inline typename Intersection_traits::result_type intersection(const typename K::Iso_cuboid_3 &box, - const typename K::Ray_3 &ray, - const K& k) + const typename K::Ray_3 &ray, + const K& k) { return intersection(ray, box, k); } @@ -1423,8 +1423,8 @@ intersection(const typename K::Iso_cuboid_3 &box, template typename Intersection_traits::result_type intersection(const typename K::Segment_3 &seg, - const typename K::Iso_cuboid_3 &box, - const K&) + const typename K::Iso_cuboid_3 &box, + const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; @@ -1485,8 +1485,8 @@ template inline typename Intersection_traits::result_type intersection(const typename K::Iso_cuboid_3 &box, - const typename K::Segment_3 &seg, - const K& k) + const typename K::Segment_3 &seg, + const K& k) { return intersection(seg, box, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_intersection_helpers.h b/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_intersection_helpers.h index 025acd70885..03a8db1348d 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_intersection_helpers.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_intersection_helpers.h @@ -66,7 +66,7 @@ void fill_segments_infos(std::vector& segments, std::vector wrapped_segments; - for(const auto& s:segments) + for(const Segment& s:segments) wrapped_segments.push_back(Wrapped_segment(s)); std::vector bis = segments; diff --git a/Intersections_3/test/Intersections_3/test_intersections_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_3.cpp index 73d72640c32..b83f4d23276 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_3.cpp @@ -720,7 +720,7 @@ struct Test { const std::vector

* poly = boost::get >(&*res); CGAL_assertion(poly != nullptr); CGAL_assertion(poly->size() == 4); - for(auto p : *poly) + for(auto& p : *poly) { CGAL_assertion(tet.has_on_boundary(p) && tr.has_on(p)); } @@ -773,7 +773,7 @@ struct Test { std::vector

* inter = boost::get >(&*res); CGAL_assertion(inter != nullptr); CGAL_assertion(inter->size() == 4); - for(auto p : *inter) + for(auto& p : *inter) { CGAL_assertion(tet.has_on_boundary(p) && tr.has_on(p)); } @@ -788,7 +788,7 @@ struct Test { inter = boost::get >(&*res); CGAL_assertion(inter != nullptr); CGAL_assertion(inter->size() == 4); - for(auto p : *inter) + for(auto& p : *inter) { CGAL_assertion(tet.has_on_boundary(p) && tr.has_on(p)); } @@ -823,7 +823,7 @@ struct Test { CGAL_assertion(inter != nullptr); CGAL_assertion(inter->size() == 4); - for(auto p : *inter) + for(auto& p : *inter) { CGAL_assertion( (tet.has_on_bounded_side(p) || tet.has_on_boundary(p)) @@ -914,7 +914,7 @@ struct Test { const std::vector

* poly = boost::get >(&*res); CGAL_assertion(poly != nullptr); CGAL_assertion(poly->size() == 4); - for(auto p : *poly) + for(auto& p : *poly) { CGAL_assertion(p.x() == 1); } @@ -922,7 +922,7 @@ struct Test { poly = boost::get >(&*res); CGAL_assertion(poly != nullptr); CGAL_assertion(poly->size() == 4); - for(auto p : *poly) + for(auto& p : *poly) { CGAL_assertion(cub.has_on_boundary(p)); } @@ -945,7 +945,7 @@ struct Test { poly = boost::get >(&*res); CGAL_assertion(poly != nullptr); CGAL_assertion(poly->size() == 4); - for(auto p : *poly) + for(auto& p : *poly) { CGAL_assertion(pl.has_on(p) && cub.has_on_boundary(p)); } @@ -956,7 +956,7 @@ struct Test { poly = boost::get >(&*res); CGAL_assertion(poly != nullptr); CGAL_assertion(poly->size() == 5); - for(auto p : *poly) + for(auto& p : *poly) { CGAL_assertion(pl.has_on(p) && cub.has_on_boundary(p)); } @@ -1105,7 +1105,7 @@ struct Test { const std::vector

* poly = boost::get >(&*res); CGAL_assertion(poly != nullptr); CGAL_assertion(poly->size() == 4); - for(auto p : *poly) + for(auto& p : *poly) { CGAL_assertion(p.x() == 1); } @@ -1131,7 +1131,7 @@ struct Test { poly = boost::get >(&*res); CGAL_assertion(poly != nullptr); CGAL_assertion(poly->size() == 5); - for(auto p : *poly) + for(auto& p : *poly) { CGAL_assertion(pl.has_on(p)); } @@ -1184,7 +1184,7 @@ struct Test { std::vector

* poly = boost::get >(&*res); CGAL_assertion(poly != nullptr); CGAL_assertion(poly->size() == 4); - for(auto p : *poly) + for(auto& p : *poly) { CGAL_assertion(tr.has_on(p) && cub.has_on_boundary(p)); } @@ -1212,7 +1212,7 @@ struct Test { std::vector

* poly = boost::get >(&*res); CGAL_assertion(poly != nullptr); CGAL_assertion(poly->size() == 4); - for(auto p : *poly) + for(auto& p : *poly) { CGAL_assertion(tr.has_on(p) && cub.has_on_boundary(p)); }