mirror of https://github.com/CGAL/cgal
make_array is not useful here
This commit is contained in:
parent
736ab7a555
commit
2bb3f9a0d3
|
|
@ -47,7 +47,7 @@ public:
|
||||||
DirectionC2() {}
|
DirectionC2() {}
|
||||||
|
|
||||||
DirectionC2(const FT &x, const FT &y)
|
DirectionC2(const FT &x, const FT &y)
|
||||||
: base(CGAL::make_array(x, y)) {}
|
: base{x, y} {}
|
||||||
|
|
||||||
bool operator==(const DirectionC2 &d) const;
|
bool operator==(const DirectionC2 &d) const;
|
||||||
bool operator!=(const DirectionC2 &d) const;
|
bool operator!=(const DirectionC2 &d) const;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public:
|
||||||
DirectionC3() {}
|
DirectionC3() {}
|
||||||
|
|
||||||
explicit DirectionC3(const Vector_3 &v)
|
explicit DirectionC3(const Vector_3 &v)
|
||||||
: base(CGAL::make_array(v.x(), v.y(), v.z())) {}
|
: base{v.x(), v.y(), v.z()} {}
|
||||||
// { *this = v.direction(); }
|
// { *this = v.direction(); }
|
||||||
|
|
||||||
explicit DirectionC3(const Line_3 &l)
|
explicit DirectionC3(const Line_3 &l)
|
||||||
|
|
@ -58,7 +58,7 @@ public:
|
||||||
{ *this = s.rep().direction(); }
|
{ *this = s.rep().direction(); }
|
||||||
|
|
||||||
DirectionC3(const FT &x, const FT &y, const FT &z)
|
DirectionC3(const FT &x, const FT &y, const FT &z)
|
||||||
: base(CGAL::make_array(x, y, z)) {}
|
: base{x, y, z} {}
|
||||||
|
|
||||||
typename R::Boolean operator==(const DirectionC3 &d) const;
|
typename R::Boolean operator==(const DirectionC3 &d) const;
|
||||||
typename R::Boolean operator!=(const DirectionC3 &d) const;
|
typename R::Boolean operator!=(const DirectionC3 &d) const;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public:
|
||||||
Iso_cuboidC3() {}
|
Iso_cuboidC3() {}
|
||||||
|
|
||||||
Iso_cuboidC3(const Point_3 &p, const Point_3 &q, int)
|
Iso_cuboidC3(const Point_3 &p, const Point_3 &q, int)
|
||||||
: base(CGAL::make_array(p, q))
|
: base{p, q}
|
||||||
{
|
{
|
||||||
// I have to remove the assertions, because of Cartesian_converter.
|
// I have to remove the assertions, because of Cartesian_converter.
|
||||||
// CGAL_kernel_assertion(p.x()<=q.x());
|
// CGAL_kernel_assertion(p.x()<=q.x());
|
||||||
|
|
@ -68,8 +68,8 @@ public:
|
||||||
Iso_cuboidC3(const Point_3 &left, const Point_3 &right,
|
Iso_cuboidC3(const Point_3 &left, const Point_3 &right,
|
||||||
const Point_3 &bottom, const Point_3 &top,
|
const Point_3 &bottom, const Point_3 &top,
|
||||||
const Point_3 &far_, const Point_3 &close)
|
const Point_3 &far_, const Point_3 &close)
|
||||||
: base(CGAL::make_array(Construct_point_3()(left.x(), bottom.y(), far_.z()),
|
: base{Construct_point_3()(left.x(), bottom.y(), far_.z()),
|
||||||
Construct_point_3()(right.x(), top.y(), close.z())))
|
Construct_point_3()(right.x(), top.y(), close.z())}
|
||||||
{
|
{
|
||||||
CGAL_kernel_precondition(!less_x(right, left));
|
CGAL_kernel_precondition(!less_x(right, left));
|
||||||
CGAL_kernel_precondition(!less_y(top, bottom));
|
CGAL_kernel_precondition(!less_y(top, bottom));
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public:
|
||||||
// : base(p, q) {}
|
// : base(p, q) {}
|
||||||
|
|
||||||
Iso_rectangleC2(const Point_2 &p, const Point_2 &q, int)
|
Iso_rectangleC2(const Point_2 &p, const Point_2 &q, int)
|
||||||
: base(CGAL::make_array(p, q))
|
: base{p, q}
|
||||||
{
|
{
|
||||||
// I have to remove the assertions, because of Cartesian_converter.
|
// I have to remove the assertions, because of Cartesian_converter.
|
||||||
// CGAL_kernel_assertion(p<=q);
|
// CGAL_kernel_assertion(p<=q);
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ public:
|
||||||
LineC2() {}
|
LineC2() {}
|
||||||
|
|
||||||
LineC2(const FT &a, const FT &b, const FT &c)
|
LineC2(const FT &a, const FT &b, const FT &c)
|
||||||
: base(CGAL::make_array(a, b, c)) {}
|
: base{a, b, c} {}
|
||||||
|
|
||||||
typename R_::Boolean operator==(const LineC2 &l) const;
|
typename R_::Boolean operator==(const LineC2 &l) const;
|
||||||
typename R_::Boolean operator!=(const LineC2 &l) const;
|
typename R_::Boolean operator!=(const LineC2 &l) const;
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public:
|
||||||
{ *this = plane_from_point_direction<R>(o, v.direction()); }
|
{ *this = plane_from_point_direction<R>(o, v.direction()); }
|
||||||
|
|
||||||
PlaneC3(const FT &a, const FT &b, const FT &c, const FT &d)
|
PlaneC3(const FT &a, const FT &b, const FT &c, const FT &d)
|
||||||
: base(CGAL::make_array(a, b, c, d)) {}
|
: base{a, b, c, d} {}
|
||||||
|
|
||||||
PlaneC3(const Line_3 &l, const Point_3 &p)
|
PlaneC3(const Line_3 &l, const Point_3 &p)
|
||||||
{ *this = plane_from_points<R>(l.point(),
|
{ *this = plane_from_points<R>(l.point(),
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
RayC2(const Point_2 &sp, const Point_2 &secondp)
|
RayC2(const Point_2 &sp, const Point_2 &secondp)
|
||||||
: base(CGAL::make_array(sp, secondp))
|
: base{sp, secondp}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,16 +43,16 @@ public:
|
||||||
RayC3() {}
|
RayC3() {}
|
||||||
|
|
||||||
RayC3(const Point_3 &sp, const Point_3 &secondp)
|
RayC3(const Point_3 &sp, const Point_3 &secondp)
|
||||||
: base(CGAL::make_array(sp, secondp)) {}
|
: base{sp, secondp} {}
|
||||||
|
|
||||||
RayC3(const Point_3 &sp, const Vector_3 &v)
|
RayC3(const Point_3 &sp, const Vector_3 &v)
|
||||||
: base(CGAL::make_array(sp, sp + v)) {}
|
: base{sp, sp + v} {}
|
||||||
|
|
||||||
RayC3(const Point_3 &sp, const Direction_3 &d)
|
RayC3(const Point_3 &sp, const Direction_3 &d)
|
||||||
: base(CGAL::make_array(sp, sp + d.to_vector())) {}
|
: base{sp, sp + d.to_vector()} {}
|
||||||
|
|
||||||
RayC3(const Point_3 &sp, const Line_3 &l)
|
RayC3(const Point_3 &sp, const Line_3 &l)
|
||||||
: base(CGAL::make_array(sp, sp + l.to_vector())) {}
|
: base{sp, sp + l.to_vector()} {}
|
||||||
|
|
||||||
typename R::Boolean operator==(const RayC3 &r) const;
|
typename R::Boolean operator==(const RayC3 &r) const;
|
||||||
typename R::Boolean operator!=(const RayC3 &r) const;
|
typename R::Boolean operator!=(const RayC3 &r) const;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
SegmentC2(const Point_2 &sp, const Point_2 &ep)
|
SegmentC2(const Point_2 &sp, const Point_2 &ep)
|
||||||
: base(CGAL::make_array(sp, ep))
|
: base{sp, ep}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
const Point_2 &
|
const Point_2 &
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public:
|
||||||
SegmentC3() {}
|
SegmentC3() {}
|
||||||
|
|
||||||
SegmentC3(const Point_3 &sp, const Point_3 &ep)
|
SegmentC3(const Point_3 &sp, const Point_3 &ep)
|
||||||
: base(CGAL::make_array(sp, ep)) {}
|
: base{sp, ep} {}
|
||||||
|
|
||||||
bool has_on(const Point_3 &p) const;
|
bool has_on(const Point_3 &p) const;
|
||||||
bool collinear_has_on(const Point_3 &p) const;
|
bool collinear_has_on(const Point_3 &p) const;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public:
|
||||||
|
|
||||||
TetrahedronC3(const Point_3 &p, const Point_3 &q, const Point_3 &r,
|
TetrahedronC3(const Point_3 &p, const Point_3 &q, const Point_3 &r,
|
||||||
const Point_3 &s)
|
const Point_3 &s)
|
||||||
: base(CGAL::make_array(p, q, r, s)) {}
|
: base{p, q, r, s} {}
|
||||||
|
|
||||||
const Point_3 & vertex(int i) const;
|
const Point_3 & vertex(int i) const;
|
||||||
const Point_3 & operator[](int i) const;
|
const Point_3 & operator[](int i) const;
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public:
|
||||||
TriangleC2() {}
|
TriangleC2() {}
|
||||||
|
|
||||||
TriangleC2(const Point_2 &p, const Point_2 &q, const Point_2 &r)
|
TriangleC2(const Point_2 &p, const Point_2 &q, const Point_2 &r)
|
||||||
: base(CGAL::make_array(p, q, r)) {}
|
: base{p, q, r} {}
|
||||||
|
|
||||||
|
|
||||||
const Point_2 &
|
const Point_2 &
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public:
|
||||||
TriangleC3() {}
|
TriangleC3() {}
|
||||||
|
|
||||||
TriangleC3(const Point_3 &p, const Point_3 &q, const Point_3 &r)
|
TriangleC3(const Point_3 &p, const Point_3 &q, const Point_3 &r)
|
||||||
: base(CGAL::make_array(p, q, r)) {}
|
: base{p, q, r} {}
|
||||||
|
|
||||||
bool operator==(const TriangleC3 &t) const;
|
bool operator==(const TriangleC3 &t) const;
|
||||||
bool operator!=(const TriangleC3 &t) const;
|
bool operator!=(const TriangleC3 &t) const;
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,10 @@ public:
|
||||||
VectorC2() {}
|
VectorC2() {}
|
||||||
|
|
||||||
VectorC2(const FT &x, const FT &y)
|
VectorC2(const FT &x, const FT &y)
|
||||||
: base(CGAL::make_array(x, y)) {}
|
: base{x, y} {}
|
||||||
|
|
||||||
VectorC2(FT&& x, FT&& y)
|
VectorC2(FT&& x, FT&& y)
|
||||||
: base(CGAL::fwd_make_array<FT>(std::move(x), std::move(y))) {}
|
: base{std::move(x), std::move(y)} {}
|
||||||
|
|
||||||
VectorC2(const FT &hx, const FT &hy, const FT &hw)
|
VectorC2(const FT &hx, const FT &hy, const FT &hw)
|
||||||
: base( hw != FT(1) ? CGAL::make_array<FT>(hx/hw, hy/hw)
|
: base( hw != FT(1) ? CGAL::make_array<FT>(hx/hw, hy/hw)
|
||||||
|
|
|
||||||
|
|
@ -65,10 +65,10 @@ public:
|
||||||
{ *this = R().construct_vector_3_object()(l); }
|
{ *this = R().construct_vector_3_object()(l); }
|
||||||
|
|
||||||
VectorC3(const FT_ &x, const FT_ &y, const FT_ &z)
|
VectorC3(const FT_ &x, const FT_ &y, const FT_ &z)
|
||||||
: base(CGAL::make_array(x, y, z)) {}
|
: base{x, y, z} {}
|
||||||
|
|
||||||
VectorC3(FT_&& x, FT_&& y, FT_&& z)
|
VectorC3(FT_&& x, FT_&& y, FT_&& z)
|
||||||
: base(CGAL::make_array(std::move(x), std::move(y), std::move(z))) {}
|
: base{std::move(x), std::move(y), std::move(z)} {}
|
||||||
|
|
||||||
VectorC3(const FT_ &x, const FT_ &y, const FT_ &z, const FT_ &w)
|
VectorC3(const FT_ &x, const FT_ &y, const FT_ &z, const FT_ &w)
|
||||||
: base( w != FT_(1) ? CGAL::make_array<FT_>(x/w, y/w, z/w)
|
: base( w != FT_(1) ? CGAL::make_array<FT_>(x/w, y/w, z/w)
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ public:
|
||||||
DirectionH2() {}
|
DirectionH2() {}
|
||||||
|
|
||||||
DirectionH2(const RT& x, const RT& y)
|
DirectionH2(const RT& x, const RT& y)
|
||||||
: base(CGAL::make_array(x, y, RT(1))) {}
|
: base{x, y, RT(1)} {}
|
||||||
|
|
||||||
// TODO Not documented : should not exist, not used.
|
// TODO Not documented : should not exist, not used.
|
||||||
// we should also change array<RT, 3> -> array<RT, 2>
|
// we should also change array<RT, 3> -> array<RT, 2>
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public:
|
||||||
Iso_cuboidH3() {}
|
Iso_cuboidH3() {}
|
||||||
|
|
||||||
Iso_cuboidH3(const Point_3& p, const Point_3& q, int)
|
Iso_cuboidH3(const Point_3& p, const Point_3& q, int)
|
||||||
: base(CGAL::make_array(p, q))
|
: base{p, q}
|
||||||
{
|
{
|
||||||
CGAL_kernel_assertion(p.x()<=q.x());
|
CGAL_kernel_assertion(p.x()<=q.x());
|
||||||
CGAL_kernel_assertion(p.y()<=q.y());
|
CGAL_kernel_assertion(p.y()<=q.y());
|
||||||
|
|
@ -173,8 +173,8 @@ CGAL_KERNEL_LARGE_INLINE
|
||||||
Iso_cuboidH3<R>::
|
Iso_cuboidH3<R>::
|
||||||
Iso_cuboidH3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
|
Iso_cuboidH3(const RT& min_hx, const RT& min_hy, const RT& min_hz,
|
||||||
const RT& max_hx, const RT& max_hy, const RT& max_hz)
|
const RT& max_hx, const RT& max_hy, const RT& max_hz)
|
||||||
: base(CGAL::make_array(Point_3(min_hx, min_hy, min_hz, RT(1)),
|
: base{Point_3(min_hx, min_hy, min_hz, RT(1)),
|
||||||
Point_3(max_hx, max_hy, max_hz, RT(1))))
|
Point_3(max_hx, max_hy, max_hz, RT(1))}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template < class R >
|
template < class R >
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public:
|
||||||
Iso_rectangleH2() {}
|
Iso_rectangleH2() {}
|
||||||
|
|
||||||
Iso_rectangleH2(const Point_2& p, const Point_2& q, int)
|
Iso_rectangleH2(const Point_2& p, const Point_2& q, int)
|
||||||
: base(CGAL::make_array(p, q))
|
: base{p, q}
|
||||||
{
|
{
|
||||||
// I have to remove the assertions, because of Homogeneous_converter.
|
// I have to remove the assertions, because of Homogeneous_converter.
|
||||||
// CGAL_kernel_assertion(p.x()<=q.x());
|
// CGAL_kernel_assertion(p.x()<=q.x());
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public:
|
||||||
|
|
||||||
LineH2() {}
|
LineH2() {}
|
||||||
LineH2(const RT& a, const RT& b, const RT& c)
|
LineH2(const RT& a, const RT& b, const RT& c)
|
||||||
: base(CGAL::make_array(a, b, c)) {}
|
: base{a, b, c} {}
|
||||||
|
|
||||||
bool operator==(const LineH2<R>& l) const;
|
bool operator==(const LineH2<R>& l) const;
|
||||||
bool operator!=(const LineH2<R>& l) const;
|
bool operator!=(const LineH2<R>& l) const;
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ public:
|
||||||
{ *this = R().construct_vector_3_object()(l); }
|
{ *this = R().construct_vector_3_object()(l); }
|
||||||
|
|
||||||
VectorH3(const Null_vector&)
|
VectorH3(const Null_vector&)
|
||||||
: base(CGAL::make_array(RT(0), RT(0), RT(0), RT(1))) {}
|
: base{RT(0), RT(0), RT(0), RT(1)} {}
|
||||||
|
|
||||||
template < typename Tx, typename Ty, typename Tz >
|
template < typename Tx, typename Ty, typename Tz >
|
||||||
VectorH3(const Tx & x, const Ty & y, const Tz & z,
|
VectorH3(const Tx & x, const Ty & y, const Tz & z,
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class Handle_for
|
||||||
T t;
|
T t;
|
||||||
std::atomic_uint count;
|
std::atomic_uint count;
|
||||||
template <class... U>
|
template <class... U>
|
||||||
RefCounted(U&&...u ) : t(std::forward<U>(u)...), count(1) {}
|
RefCounted(U&&...u ) : t{std::forward<U>(u)...}, count(1) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue