mirror of https://github.com/CGAL/cgal
Make all conversions between Point and Weighted_point explicit
Also doc changes
This commit is contained in:
parent
e63de324ec
commit
e95d3d3f2b
|
|
@ -53,6 +53,7 @@ public:
|
||||||
Weighted_pointC2(const Origin &o)
|
Weighted_pointC2(const Origin &o)
|
||||||
: base(o, 0) {}
|
: base(o, 0) {}
|
||||||
|
|
||||||
|
explicit
|
||||||
Weighted_pointC2 (const Point_2 &p)
|
Weighted_pointC2 (const Point_2 &p)
|
||||||
: base(p,0)
|
: base(p,0)
|
||||||
{}
|
{}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ public:
|
||||||
Weighted_pointH2(const Origin &o)
|
Weighted_pointH2(const Origin &o)
|
||||||
: base(o, 0) {}
|
: base(o, 0) {}
|
||||||
|
|
||||||
|
explicit
|
||||||
Weighted_pointH2 (const Point_2 &p)
|
Weighted_pointH2 (const Point_2 &p)
|
||||||
: base(p,0)
|
: base(p,0)
|
||||||
{}
|
{}
|
||||||
|
|
|
||||||
|
|
@ -85,8 +85,11 @@ Point_2(const Kernel::FT &x, const Kernel::FT &y);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
introduces a point from a weighted point.
|
introduces a point from a weighted point.
|
||||||
|
|
||||||
|
\warning The `explicit` keyword is used to not have accidental implicit conversions
|
||||||
|
between Point_2 and Weighted_point_2.
|
||||||
*/
|
*/
|
||||||
Point_2(const Kernel::Weighted_point_2 &wp);
|
explicit Point_2(const Kernel::Weighted_point_2 &wp);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,11 @@ Point_3(const Kernel::FT &x, const Kernel::FT &y, const Kernel::FT &z);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
introduces a point from a weighted point.
|
introduces a point from a weighted point.
|
||||||
|
|
||||||
|
\warning The `explicit` keyword is used to not have accidental implicit conversions
|
||||||
|
between Point_3 and Weighted_point_3.
|
||||||
*/
|
*/
|
||||||
Point_3(const Kernel::Weighted_point_3 &wp);
|
explicit Point_3(const Kernel::Weighted_point_3 &wp);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,9 @@ public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
introduces a weighted point from point `p` and weight `0`.
|
introduces a weighted point from point `p` and weight `0`.
|
||||||
|
|
||||||
|
\warning The `explicit` keyword is used to not have accidental implicit conversions
|
||||||
|
between Point_2 and Weighted_point_2.
|
||||||
*/
|
*/
|
||||||
Weighted_point_2(const Point_2<Kernel>& p);
|
Weighted_point_2(const Point_2<Kernel>& p);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,11 +78,10 @@ public:
|
||||||
: RPoint_2(p)
|
: RPoint_2(p)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#if 0
|
explicit
|
||||||
Point_2(const Weighted_point_2& wp)
|
Point_2(const Weighted_point_2& wp)
|
||||||
: Rep(wp.point())
|
: Rep(wp.point())
|
||||||
{}
|
{}
|
||||||
#endif
|
|
||||||
|
|
||||||
template < typename T1, typename T2 >
|
template < typename T1, typename T2 >
|
||||||
Point_2(const T1 &x, const T2 &y)
|
Point_2(const T1 &x, const T2 &y)
|
||||||
|
|
|
||||||
|
|
@ -74,11 +74,12 @@ public:
|
||||||
|
|
||||||
Point_3(const Rep& p)
|
Point_3(const Rep& p)
|
||||||
: Rep(p) {}
|
: Rep(p) {}
|
||||||
#if 0
|
|
||||||
|
explicit
|
||||||
Point_3(const Weighted_point_3& wp)
|
Point_3(const Weighted_point_3& wp)
|
||||||
: Rep(wp.point())
|
: Rep(wp.point())
|
||||||
{}
|
{}
|
||||||
#endif
|
|
||||||
template < typename T1, typename T2, typename T3 >
|
template < typename T1, typename T2, typename T3 >
|
||||||
Point_3(const T1& x, const T2& y, const T3& z)
|
Point_3(const T1& x, const T2& y, const T3& z)
|
||||||
: Rep(typename R::Construct_point_3()(Return_base_tag(), x, y, z))
|
: Rep(typename R::Construct_point_3()(Return_base_tag(), x, y, z))
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,8 @@ public:
|
||||||
Weighted_point_2(const Rep& p)
|
Weighted_point_2(const Rep& p)
|
||||||
: Rep(p) {}
|
: Rep(p) {}
|
||||||
|
|
||||||
explicit Weighted_point_2(const Point_2& p)
|
explicit
|
||||||
|
Weighted_point_2(const Point_2& p)
|
||||||
: Rep(typename R::Construct_weighted_point_2()(Return_base_tag(), p, 0))
|
: Rep(typename R::Construct_weighted_point_2()(Return_base_tag(), p, 0))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,8 @@ public:
|
||||||
Weighted_point_3(const Rep& p)
|
Weighted_point_3(const Rep& p)
|
||||||
: Rep(p) {}
|
: Rep(p) {}
|
||||||
|
|
||||||
explicit Weighted_point_3(const Point_3& p)
|
explicit
|
||||||
|
Weighted_point_3(const Point_3& p)
|
||||||
: Rep(typename R::Construct_weighted_point_3()(Return_base_tag(), p, 0))
|
: Rep(typename R::Construct_weighted_point_3()(Return_base_tag(), p, 0))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue