mirror of https://github.com/CGAL/cgal
Move-construct kernel objects
This saves a Handle copy in Lazy_construction
This commit is contained in:
parent
995ae60c89
commit
099fd7cb52
|
|
@ -63,6 +63,9 @@ public:
|
|||
Circle_2(const RCircle_2& t)
|
||||
: RCircle_2(t) {}
|
||||
|
||||
Circle_2(RCircle_2&& t)
|
||||
: RCircle_2(std::move(t)) {}
|
||||
|
||||
Circle_2(const Point_2 ¢er, const FT &squared_radius,
|
||||
const Orientation &orientation)
|
||||
: RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, squared_radius, orientation)) {}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,9 @@ public:
|
|||
Circle_3(const Rep& r)
|
||||
: Rep(r) {}
|
||||
|
||||
Circle_3(Rep&& r)
|
||||
: Rep(std::move(r)) {}
|
||||
|
||||
typename cpp11::result_of
|
||||
<typename R::Construct_sphere_3( Circle_3)>::type
|
||||
diametral_sphere() const
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ public:
|
|||
Direction_2(const RDirection_2& d)
|
||||
: RDirection_2(d) {}
|
||||
|
||||
Direction_2(RDirection_2&& d)
|
||||
: RDirection_2(std::move(d)) {}
|
||||
|
||||
explicit Direction_2(const Vector_2& v)
|
||||
: RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), v)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,9 @@ public:
|
|||
Direction_3(const Rep& d)
|
||||
: Rep(d) {}
|
||||
|
||||
Direction_3(Rep&& d)
|
||||
: Rep(std::move(d)) {}
|
||||
|
||||
explicit Direction_3(const Vector_3& v)
|
||||
: Rep(typename R::Construct_direction_3()(Return_base_tag(), v)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ public:
|
|||
Line_2(const RLine_2& l) // conversion impl -> interface class
|
||||
: RLine_2(l) {}
|
||||
|
||||
Line_2(RLine_2&& l)
|
||||
: RLine_2(std::move(l)) {}
|
||||
|
||||
Line_2(const Point_2 &p, const Point_2 &q)
|
||||
: RLine_2(typename R::Construct_line_2()(Return_base_tag(), p,q)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ public:
|
|||
Line_3(const Rep& l)
|
||||
: Rep(l) {}
|
||||
|
||||
Line_3(Rep&& l)
|
||||
: Rep(std::move(l)) {}
|
||||
|
||||
Line_3(const Point_3 & p, const Point_3 & q)
|
||||
: Rep(typename R::Construct_line_3()(Return_base_tag(), p, q)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,9 @@ public:
|
|||
Plane_3(const Rep& p)
|
||||
: Rep(p) {}
|
||||
|
||||
Plane_3(Rep&& p)
|
||||
: Rep(std::move(p)) {}
|
||||
|
||||
Plane_3(const Point_3& p, const Point_3& q, const Point_3& r)
|
||||
: Rep(typename R::Construct_plane_3()(Return_base_tag(), p, q, r)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,10 @@ public:
|
|||
: RPoint_2(p)
|
||||
{}
|
||||
|
||||
Point_2(RPoint_2&& p)
|
||||
: RPoint_2(std::move(p))
|
||||
{}
|
||||
|
||||
explicit
|
||||
Point_2(const Weighted_point_2& wp)
|
||||
: Rep(wp.point())
|
||||
|
|
|
|||
|
|
@ -67,6 +67,9 @@ public:
|
|||
Point_3(const Rep& p)
|
||||
: Rep(p) {}
|
||||
|
||||
Point_3(Rep&& p)
|
||||
: Rep(std::move(p)) {}
|
||||
|
||||
explicit
|
||||
Point_3(const Weighted_point_3& wp)
|
||||
: Rep(wp.point())
|
||||
|
|
|
|||
|
|
@ -68,6 +68,9 @@ public:
|
|||
Ray_2(const RRay_2& r)
|
||||
: RRay_2(r) {}
|
||||
|
||||
Ray_2(RRay_2&& r)
|
||||
: RRay_2(std::move(r)) {}
|
||||
|
||||
Ray_2(const Point_2 &sp, const Point_2 &secondp)
|
||||
: RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, secondp)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ public:
|
|||
Ray_3(const Rep& r)
|
||||
: Rep(r) {}
|
||||
|
||||
Ray_3(Rep&& r)
|
||||
: Rep(std::move(r)) {}
|
||||
|
||||
Ray_3(const Point_3& sp, const Point_3& secondp)
|
||||
: Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, secondp)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,9 @@ public:
|
|||
Segment_2(const RSegment_2& s)
|
||||
: RSegment_2(s) {}
|
||||
|
||||
Segment_2(RSegment_2&& s)
|
||||
: RSegment_2(std::move(s)) {}
|
||||
|
||||
Segment_2(const Point_2 &sp, const Point_2 &ep)
|
||||
: RSegment_2(typename R::Construct_segment_2()(Return_base_tag(), sp,ep)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,9 @@ public:
|
|||
Segment_3(const Rep& s)
|
||||
: Rep(s) {}
|
||||
|
||||
Segment_3(Rep&& s)
|
||||
: Rep(std::move(s)) {}
|
||||
|
||||
Segment_3(const Point_3& sp, const Point_3& ep)
|
||||
: Rep(typename R::Construct_segment_3()(Return_base_tag(), sp, ep)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@ public:
|
|||
Sphere_3(const Rep& s)
|
||||
: Rep(s) {}
|
||||
|
||||
Sphere_3(Rep&& s)
|
||||
: Rep(std::move(s)) {}
|
||||
|
||||
Sphere_3(const Point_3_& p, const FT& sq_rad,
|
||||
const Orientation& o = COUNTERCLOCKWISE)
|
||||
: Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, sq_rad, o)) {}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@ public:
|
|||
Tetrahedron_3(const Rep& t)
|
||||
: Rep(t) {}
|
||||
|
||||
Tetrahedron_3(Rep&& t)
|
||||
: Rep(std::move(t)) {}
|
||||
|
||||
Tetrahedron_3(const Point_3& p, const Point_3& q,
|
||||
const Point_3& r, const Point_3& s)
|
||||
: Rep(typename R::Construct_tetrahedron_3()(Return_base_tag(), p, q, r, s)) {}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ public:
|
|||
Vector_2(const RVector_2& v)
|
||||
: RVector_2(v) {}
|
||||
|
||||
Vector_2(RVector_2&& v)
|
||||
: RVector_2(std::move(v)) {}
|
||||
|
||||
Vector_2(const Point_2& a, const Point_2& b)
|
||||
: RVector_2(typename R::Construct_vector_2()(Return_base_tag(), a, b)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ public:
|
|||
Vector_3(const Rep& v)
|
||||
: Rep(v) {}
|
||||
|
||||
Vector_3(Rep&& v)
|
||||
: Rep(std::move(v)) {}
|
||||
|
||||
Vector_3(const Point_3& a, const Point_3& b)
|
||||
: Rep(typename R::Construct_vector_3()(Return_base_tag(), a, b)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,9 @@ public:
|
|||
Weighted_point_2(const Rep& p)
|
||||
: Rep(p) {}
|
||||
|
||||
Weighted_point_2(Rep&& p)
|
||||
: Rep(std::move(p)) {}
|
||||
|
||||
explicit
|
||||
Weighted_point_2(const Point_2& p)
|
||||
: Rep(typename R::Construct_weighted_point_2()(Return_base_tag(), p, 0))
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ public:
|
|||
Weighted_point_3(const Rep& p)
|
||||
: Rep(p) {}
|
||||
|
||||
Weighted_point_3(Rep&& p)
|
||||
: Rep(std::move(p)) {}
|
||||
|
||||
explicit
|
||||
Weighted_point_3(const Point_3& p)
|
||||
: Rep(typename R::Construct_weighted_point_3()(Return_base_tag(), p, 0))
|
||||
|
|
|
|||
Loading…
Reference in New Issue