Skip to content

Commit

Permalink
make_array is not useful here
Browse files Browse the repository at this point in the history
  • Loading branch information
lrineau committed Apr 19, 2024
1 parent 736ab7a commit 2bb3f9a
Show file tree
Hide file tree
Showing 21 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Cartesian_kernel/include/CGAL/Cartesian/Direction_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class DirectionC2
DirectionC2() {}

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;
Expand Down
4 changes: 2 additions & 2 deletions Cartesian_kernel/include/CGAL/Cartesian/Direction_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class DirectionC3
DirectionC3() {}

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

explicit DirectionC3(const Line_3 &l)
Expand All @@ -58,7 +58,7 @@ class DirectionC3
{ *this = s.rep().direction(); }

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;
Expand Down
6 changes: 3 additions & 3 deletions Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Iso_cuboidC3
Iso_cuboidC3() {}

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.
// CGAL_kernel_assertion(p.x()<=q.x());
Expand All @@ -68,8 +68,8 @@ class Iso_cuboidC3
Iso_cuboidC3(const Point_3 &left, const Point_3 &right,
const Point_3 &bottom, const Point_3 &top,
const Point_3 &far_, const Point_3 &close)
: base(CGAL::make_array(Construct_point_3()(left.x(), bottom.y(), far_.z()),
Construct_point_3()(right.x(), top.y(), close.z())))
: base{Construct_point_3()(left.x(), bottom.y(), far_.z()),
Construct_point_3()(right.x(), top.y(), close.z())}
{
CGAL_kernel_precondition(!less_x(right, left));
CGAL_kernel_precondition(!less_y(top, bottom));
Expand Down
2 changes: 1 addition & 1 deletion Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Iso_rectangleC2
// : base(p, q) {}

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.
// CGAL_kernel_assertion(p<=q);
Expand Down
2 changes: 1 addition & 1 deletion Cartesian_kernel/include/CGAL/Cartesian/Line_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class LineC2
LineC2() {}

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;
Expand Down
2 changes: 1 addition & 1 deletion Cartesian_kernel/include/CGAL/Cartesian/Plane_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class PlaneC3
{ *this = plane_from_point_direction<R>(o, v.direction()); }

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)
{ *this = plane_from_points<R>(l.point(),
Expand Down
2 changes: 1 addition & 1 deletion Cartesian_kernel/include/CGAL/Cartesian/Ray_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class RayC2
{}

RayC2(const Point_2 &sp, const Point_2 &secondp)
: base(CGAL::make_array(sp, secondp))
: base{sp, secondp}
{}


Expand Down
8 changes: 4 additions & 4 deletions Cartesian_kernel/include/CGAL/Cartesian/Ray_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ class RayC3
RayC3() {}

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)
: base(CGAL::make_array(sp, sp + v)) {}
: base{sp, sp + v} {}

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)
: 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;
Expand Down
2 changes: 1 addition & 1 deletion Cartesian_kernel/include/CGAL/Cartesian/Segment_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SegmentC2
{}

SegmentC2(const Point_2 &sp, const Point_2 &ep)
: base(CGAL::make_array(sp, ep))
: base{sp, ep}
{}

const Point_2 &
Expand Down
2 changes: 1 addition & 1 deletion Cartesian_kernel/include/CGAL/Cartesian/Segment_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SegmentC3
SegmentC3() {}

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 collinear_has_on(const Point_3 &p) const;
Expand Down
2 changes: 1 addition & 1 deletion Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class TetrahedronC3

TetrahedronC3(const Point_3 &p, const Point_3 &q, const Point_3 &r,
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 & operator[](int i) const;
Expand Down
2 changes: 1 addition & 1 deletion Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TriangleC2
TriangleC2() {}

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 &
Expand Down
2 changes: 1 addition & 1 deletion Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class TriangleC3
TriangleC3() {}

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;
Expand Down
4 changes: 2 additions & 2 deletions Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ class VectorC2
VectorC2() {}

VectorC2(const FT &x, const FT &y)
: base(CGAL::make_array(x, y)) {}
: base{x, 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)
: base( hw != FT(1) ? CGAL::make_array<FT>(hx/hw, hy/hw)
Expand Down
4 changes: 2 additions & 2 deletions Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ class VectorC3
{ *this = R().construct_vector_3_object()(l); }

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)
: 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)
: base( w != FT_(1) ? CGAL::make_array<FT_>(x/w, y/w, z/w)
Expand Down
2 changes: 1 addition & 1 deletion Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH2.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DirectionH2
DirectionH2() {}

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.
// we should also change array<RT, 3> -> array<RT, 2>
Expand Down
6 changes: 3 additions & 3 deletions Homogeneous_kernel/include/CGAL/Homogeneous/Iso_cuboidH3.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Iso_cuboidH3
Iso_cuboidH3() {}

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.y()<=q.y());
Expand Down Expand Up @@ -173,8 +173,8 @@ CGAL_KERNEL_LARGE_INLINE
Iso_cuboidH3<R>::
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)
: base(CGAL::make_array(Point_3(min_hx, min_hy, min_hz, RT(1)),
Point_3(max_hx, max_hy, max_hz, RT(1))))
: base{Point_3(min_hx, min_hy, min_hz, RT(1)),
Point_3(max_hx, max_hy, max_hz, RT(1))}
{}

template < class R >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Iso_rectangleH2
Iso_rectangleH2() {}

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.
// CGAL_kernel_assertion(p.x()<=q.x());
Expand Down
2 changes: 1 addition & 1 deletion Homogeneous_kernel/include/CGAL/Homogeneous/LineH2.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class LineH2

LineH2() {}
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;
Expand Down
2 changes: 1 addition & 1 deletion Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class VectorH3
{ *this = R().construct_vector_3_object()(l); }

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 >
VectorH3(const Tx & x, const Ty & y, const Tz & z,
Expand Down
2 changes: 1 addition & 1 deletion STL_Extension/include/CGAL/Handle_for.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Handle_for
T t;
std::atomic_uint count;
template <class... U>
RefCounted(U&&...u ) : t(std::forward<U>(u)...), count(1) {}
RefCounted(U&&...u ) : t{std::forward<U>(u)...}, count(1) {}
};


Expand Down

0 comments on commit 2bb3f9a

Please sign in to comment.