mirror of https://github.com/CGAL/cgal
Mark most one-argument constructors explicit.
This commit is contained in:
parent
9806cf02a0
commit
da8f43f45f
|
|
@ -70,16 +70,16 @@ public:
|
|||
Direction_2(const RDirection_2& d)
|
||||
: RDirection_2(d) {}
|
||||
|
||||
Direction_2(const Vector_2& v)
|
||||
explicit Direction_2(const Vector_2& v)
|
||||
: RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), v)) {}
|
||||
|
||||
Direction_2(const Line_2& l)
|
||||
explicit Direction_2(const Line_2& l)
|
||||
: RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), l)) {}
|
||||
|
||||
Direction_2(const Ray_2& r)
|
||||
explicit Direction_2(const Ray_2& r)
|
||||
: RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), r)) {}
|
||||
|
||||
Direction_2(const Segment_2& s)
|
||||
explicit Direction_2(const Segment_2& s)
|
||||
: RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), s)) {}
|
||||
|
||||
Direction_2(const RT &x, const RT &y)
|
||||
|
|
|
|||
|
|
@ -69,16 +69,16 @@ public:
|
|||
Direction_3(const Rep& d)
|
||||
: Rep(d) {}
|
||||
|
||||
Direction_3(const Vector_3& v)
|
||||
explicit Direction_3(const Vector_3& v)
|
||||
: Rep(typename R::Construct_direction_3()(Return_base_tag(), v)) {}
|
||||
|
||||
Direction_3(const Line_3& l)
|
||||
explicit Direction_3(const Line_3& l)
|
||||
: Rep(typename R::Construct_direction_3()(Return_base_tag(), l)) {}
|
||||
|
||||
Direction_3(const Ray_3& r)
|
||||
explicit Direction_3(const Ray_3& r)
|
||||
: Rep(typename R::Construct_direction_3()(Return_base_tag(), r)) {}
|
||||
|
||||
Direction_3(const Segment_3& s)
|
||||
explicit Direction_3(const Segment_3& s)
|
||||
: Rep(typename R::Construct_direction_3()(Return_base_tag(), s)) {}
|
||||
|
||||
Direction_3(const RT& hx, const RT& hy, const RT& hz)
|
||||
|
|
|
|||
|
|
@ -77,10 +77,10 @@ public:
|
|||
Line_2(const RT &a, const RT &b, const RT &c)
|
||||
: RLine_2(typename R::Construct_line_2()(Return_base_tag(), a,b,c)) {}
|
||||
|
||||
Line_2(const Segment_2& s)
|
||||
explicit Line_2(const Segment_2& s)
|
||||
: RLine_2(typename R::Construct_line_2()(Return_base_tag(), s)) {}
|
||||
|
||||
Line_2(const Ray_2& r)
|
||||
explicit Line_2(const Ray_2& r)
|
||||
: RLine_2(typename R::Construct_line_2()(Return_base_tag(), r)) {}
|
||||
|
||||
Line_2(const Point_2 &p, const Direction_2 &d)
|
||||
|
|
|
|||
|
|
@ -75,10 +75,10 @@ public:
|
|||
Line_3(const Point_3 & p, const Point_3 & q)
|
||||
: Rep(typename R::Construct_line_3()(Return_base_tag(), p, q)) {}
|
||||
|
||||
Line_3(const Segment_3 & s)
|
||||
explicit Line_3(const Segment_3 & s)
|
||||
: Rep(typename R::Construct_line_3()(Return_base_tag(), s)) {}
|
||||
|
||||
Line_3(const Ray_3 & r)
|
||||
explicit Line_3(const Ray_3 & r)
|
||||
: Rep(typename R::Construct_line_3()(Return_base_tag(), r)) {}
|
||||
|
||||
Line_3(const Point_3 & p, const Direction_3 & d)
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public:
|
|||
Plane_3(const Ray_3& r, const Point_3& p)
|
||||
: Rep(typename R::Construct_plane_3()(Return_base_tag(), r, p)) {}
|
||||
|
||||
Plane_3(const Circle_3& c)
|
||||
explicit Plane_3(const Circle_3& c)
|
||||
: Rep(typename R::Construct_plane_3()(c)) {}
|
||||
|
||||
Plane_3 transform(const Aff_transformation_3 &t) const
|
||||
|
|
|
|||
|
|
@ -84,10 +84,10 @@ public:
|
|||
const Orientation& o = COUNTERCLOCKWISE)
|
||||
: Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, q, o)) {}
|
||||
|
||||
Sphere_3(const Point_3& p, const Orientation& o = COUNTERCLOCKWISE)
|
||||
explicit Sphere_3(const Point_3& p, const Orientation& o = COUNTERCLOCKWISE)
|
||||
: Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, o)) {}
|
||||
|
||||
Sphere_3(const Circle_3& c)
|
||||
explicit Sphere_3(const Circle_3& c)
|
||||
: Rep(typename R::Construct_sphere_3()(c)) {}
|
||||
|
||||
Sphere_3 orthogonal_transform(const Aff_transformation_3 &t) const;
|
||||
|
|
|
|||
|
|
@ -78,13 +78,13 @@ public:
|
|||
Vector_2(const Point_2& a, const Point_2& b)
|
||||
: RVector_2(typename R::Construct_vector_2()(Return_base_tag(), a, b)) {}
|
||||
|
||||
Vector_2(const Segment_2 &s)
|
||||
explicit Vector_2(const Segment_2 &s)
|
||||
: RVector_2(typename R::Construct_vector_2()(Return_base_tag(), s)) {}
|
||||
|
||||
Vector_2(const Ray_2 &r)
|
||||
explicit Vector_2(const Ray_2 &r)
|
||||
: RVector_2(typename R::Construct_vector_2()(Return_base_tag(), r)) {}
|
||||
|
||||
Vector_2(const Line_2 &l)
|
||||
explicit Vector_2(const Line_2 &l)
|
||||
: RVector_2(typename R::Construct_vector_2()(Return_base_tag(), l)) {}
|
||||
|
||||
Vector_2(const Null_vector &v)
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@ public:
|
|||
Vector_3(const Point_3& a, const Point_3& b)
|
||||
: Rep(typename R::Construct_vector_3()(Return_base_tag(), a, b)) {}
|
||||
|
||||
Vector_3(const Segment_3& s)
|
||||
explicit Vector_3(const Segment_3& s)
|
||||
: Rep(typename R::Construct_vector_3()(Return_base_tag(), s)) {}
|
||||
|
||||
Vector_3(const Ray_3& r)
|
||||
explicit Vector_3(const Ray_3& r)
|
||||
: Rep(typename R::Construct_vector_3()(Return_base_tag(), r)) {}
|
||||
|
||||
Vector_3(const Line_3& l)
|
||||
explicit Vector_3(const Line_3& l)
|
||||
: Rep(typename R::Construct_vector_3()(Return_base_tag(), l)) {}
|
||||
|
||||
Vector_3(const Null_vector& v)
|
||||
|
|
|
|||
|
|
@ -144,8 +144,8 @@ void _test_circle_construct(const K &k) {
|
|||
assert(theEqual_3(circle,circle2));
|
||||
assert(theEqual_3(circle,circle3));
|
||||
|
||||
Plane_3 pus = circle2;
|
||||
Sphere_3 sus = circle3;
|
||||
Plane_3 pus(circle2);
|
||||
Sphere_3 sus(circle3);
|
||||
assert(pus == circle2.supporting_plane());
|
||||
assert(sus == circle3.diametral_sphere());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue