more clean-up

This commit is contained in:
Maxime Gimeno 2020-03-19 16:41:59 +01:00
parent ce4cbe6d06
commit fe0d4d0a6e
8 changed files with 135 additions and 133 deletions

View File

@ -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<K> is_t;
is_t ispair(&tr1, &tr2);
typedef Triangle_2_Triangle_2_pair<K> 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<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>();
case is_t::POINT:
case Intersection_type::POINT:
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(ispair.intersection_point());
case is_t::SEGMENT:
case Intersection_type::SEGMENT:
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(ispair.intersection_segment());
case is_t::TRIANGLE:
case Intersection_type::TRIANGLE:
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(ispair.intersection_triangle());
case is_t::POLYGON:
case Intersection_type::POLYGON:
{
typedef std::vector<typename K::Point_2> Container;
Container points(ispair.vertex_count());
@ -372,10 +372,7 @@ intersection(const typename K::Triangle_2 &tr1,
if(Is_cw<K, typename Algebraic_structure_traits<typename K::FT>::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<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(points);

View File

@ -173,8 +173,8 @@ struct Intersection_traits<K, typename K::Iso_cuboid_3, CGAL::Bbox_3>
template<typename K>
struct Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Point_3> {
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<typename K>
struct Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Plane_3> {
typedef typename
boost::variant< typename K::Point_3, typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};
@ -191,7 +191,7 @@ template<typename K>
struct Intersection_traits<K, typename K::Plane_3, typename K::Iso_cuboid_3> {
typedef typename
boost::variant< typename K::Point_3, typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};
@ -201,7 +201,7 @@ template<typename K>
struct Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Triangle_3> {
typedef typename
boost::variant< typename K::Point_3, typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};
@ -210,7 +210,7 @@ template<typename K>
struct Intersection_traits<K, typename K::Triangle_3, typename K::Iso_cuboid_3> {
typedef typename
boost::variant< typename K::Point_3, typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};
@ -220,7 +220,7 @@ template<typename K>
struct Intersection_traits<K, typename CGAL::Bbox_3, typename K::Plane_3> {
typedef typename
boost::variant< typename K::Point_3, typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};
@ -229,7 +229,7 @@ template<typename K>
struct Intersection_traits<K, typename K::Plane_3, typename CGAL::Bbox_3> {
typedef typename
boost::variant< typename K::Point_3, typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};
@ -239,7 +239,7 @@ template<typename K>
struct Intersection_traits<K, typename CGAL::Bbox_3, typename K::Triangle_3> {
typedef typename
boost::variant< typename K::Point_3, typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};
@ -248,7 +248,7 @@ template<typename K>
struct Intersection_traits<K, typename K::Triangle_3, typename CGAL::Bbox_3> {
typedef typename
boost::variant< typename K::Point_3, typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};
@ -379,7 +379,7 @@ struct Intersection_traits<K, typename K::Tetrahedron_3, typename K::Plane_3>
{
typedef typename
boost::variant< typename K::Point_3 , typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};
@ -389,7 +389,7 @@ struct Intersection_traits<K, typename K::Plane_3,typename K::Tetrahedron_3>
{
typedef typename
boost::variant< typename K::Point_3 , typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};
@ -399,7 +399,7 @@ struct Intersection_traits<K, typename K::Triangle_3,typename K::Tetrahedron_3>
{
typedef typename
boost::variant< typename K::Point_3 , typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};
@ -409,7 +409,7 @@ struct Intersection_traits<K, typename K::Tetrahedron_3,typename K::Triangle_3>
{
typedef typename
boost::variant< typename K::Point_3 , typename K::Segment_3,
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
typedef typename boost::optional< variant_type > result_type;
};

View File

@ -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<Point_3> 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<typename K::Triangle_3>(tr));

View File

@ -32,7 +32,7 @@ struct Tetrahedron_segment_intersection_3
typedef typename K::Segment_3 O;
typedef Tetrahedron_lines_intersection_3_base<K,typename K::Segment_3,
Tetrahedron_segment_intersection_3<K> > 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<typename K::Segment_3>(result));
this->output = result_type(std::forward<typename K::Segment_3>(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<typename K::Segment_3>(result));
this->output = result_type(std::forward<typename K::Segment_3>(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<typename K::Segment_3>(result));
this->output = result_type(std::forward<typename K::Segment_3>(result));
return true;
}
return false;

View File

@ -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<Poly>(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<Poly>(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<Poly>(res));
}
}

View File

@ -82,8 +82,8 @@ namespace internal {
template <class K>
typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::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 <class K>
inline
typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::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 <class K>
typename Intersection_traits<K, typename K::Plane_3, typename K::Plane_3>::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<typename K::Point_3,
typename K::Line_3,
typename K::Plane_3> >
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 <class K>
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 <class K>
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 <class K>
typename Intersection_traits<K, typename K::Line_3, typename K::Line_3>::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 <class K>
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 <class K>
typename Intersection_traits<K, typename K::Segment_3, typename K::Segment_3>::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 <class K>
typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::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 <class K>
typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::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 <class K>
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 <class K>
typename Intersection_traits<K, typename K::Line_3, typename K::Ray_3>::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 <class K>
typename Intersection_traits<K, typename K::Ray_3, typename K::Line_3>::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 <class K>
typename Intersection_traits<K, typename K::Segment_3, typename K::Ray_3>::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 <class K>
typename Intersection_traits<K, typename K::Ray_3, typename K::Segment_3>::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 <class K>
typename Intersection_traits<K, typename K::Ray_3, typename K::Ray_3>::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 <class K>
typename Intersection_traits<K, typename K::Plane_3, typename K::Ray_3>::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 <class K>
inline
typename Intersection_traits<K, typename K::Ray_3, typename K::Plane_3>::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 <class K>
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 <class K>
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 <class K>
typename Intersection_traits<K, typename K::Plane_3, typename K::Segment_3>::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 <class K>
inline
typename Intersection_traits<K, typename K::Segment_3, typename K::Plane_3>::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 <class K>
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 <class K>
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 <class K>
inline
typename Intersection_traits<K, typename K::Plane_3, typename K::Triangle_3>::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<K, typename K::Plane_3, typename K::Line_3>::result_type
@ -1139,8 +1139,8 @@ template <class K>
inline
typename Intersection_traits<K, typename K::Triangle_3, typename K::Plane_3>::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 <class K>
typename Intersection_traits<K, typename K::Line_3, Bbox_3>::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 <class K>
inline
typename Intersection_traits<K, Bbox_3, typename K::Line_3>::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 <class K>
typename Intersection_traits<K, typename K::Ray_3, Bbox_3>::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 <class K>
inline
typename Intersection_traits<K, Bbox_3, typename K::Ray_3>::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 <class K>
typename Intersection_traits<K, typename K::Segment_3, Bbox_3>::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 <class K>
inline
typename Intersection_traits<K, Bbox_3, typename K::Segment_3>::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 <class K>
inline
typename Intersection_traits<K, Bbox_3, Bbox_3>::result_type
intersection(const Bbox_3 &a,
const Bbox_3 &b,
const K&)
const Bbox_3 &b,
const K&)
{
return CGAL::intersection<K>(a, b);
}
@ -1257,8 +1257,8 @@ intersection(const Bbox_3 &a,
template <class K>
typename Intersection_traits<K, CGAL::Bbox_3, typename K::Iso_cuboid_3>::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 <class K>
inline
typename Intersection_traits<K, typename K::Iso_cuboid_3, CGAL::Bbox_3>::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 <class K>
typename Intersection_traits<K, typename K::Line_3, typename K::Iso_cuboid_3>::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 <class K>
inline
typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Line_3>::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 <class K>
typename Intersection_traits<K, typename K::Ray_3, typename K::Iso_cuboid_3>::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 <class K>
inline
typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Ray_3>::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 <class K>
typename Intersection_traits<K, typename K::Segment_3, typename K::Iso_cuboid_3>::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 <class K>
inline
typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Segment_3>::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);
}

View File

@ -66,7 +66,7 @@ void fill_segments_infos(std::vector<Segment>& segments,
std::vector<Wrapped_segment> wrapped_segments;
for(const auto& s:segments)
for(const Segment& s:segments)
wrapped_segments.push_back(Wrapped_segment(s));
std::vector<Segment> bis = segments;

View File

@ -720,7 +720,7 @@ struct Test {
const std::vector<P>* poly = boost::get<std::vector<P> >(&*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<P>* inter = boost::get<std::vector<P> >(&*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<std::vector<P> >(&*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<P>* poly = boost::get<std::vector<P> >(&*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<std::vector<P> >(&*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<std::vector<P> >(&*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<std::vector<P> >(&*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<P>* poly = boost::get<std::vector<P> >(&*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<std::vector<P> >(&*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<P>* poly = boost::get<std::vector<P> >(&*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<P>* poly = boost::get<std::vector<P> >(&*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));
}