Skip to content

Commit

Permalink
Remove d of Bbox_d constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Feb 10, 2025
1 parent 30308f9 commit 5714884
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ auto FrechetKdTree<Traits>::to_kd_tree_point(const Polyline& curve) -> Point_d

res.ends[0] = curve.front();
res.ends[1] = curve.back();
Bbox_d<Dimension_tag<dim>> bb(dim);
Bbox_d<Dimension_tag<dim>> bb;
for (auto const& point : curve) {
Bbox_d<Dimension_tag<dim>> bbb = construct_bbox(point);
bb += bbb;
bb += bbb;
}
res.bbox.reserve(2*dim);
for(auto it = bb.cartesian_begin(); it != bb.cartesian_end(); ++it){
Expand Down
2 changes: 1 addition & 1 deletion Kernel_d/doc/Kernel_d/CGAL/Bbox_d.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ typedef unspecified_type Cartesian_const_iterator;
constructs an \em empty bounding box with lower left
corner coordinates at \f$ \infty \f$
and with upper right corner coordinates at
\f$ -\infty \f$, \f$ \infty \f$ being
\f$ -\infty \f$, where \f$ \infty \f$ means
`std::numeric_limits<double>::%infinity()`.
*/
Bbox_d();
Expand Down
6 changes: 3 additions & 3 deletions NewKernel_d/include/CGAL/Bbox_d.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ class Bbox_d<Dimension_tag<N>> : public Impl::Bbox<std::array<double, N>, Bbox_d
using Cartesian_const_iterator = Concatenate_iterator<array_const_iterator,array_const_iterator>;

inline constexpr int dimension() const { return D; }
Bbox_d(int d = 0 ) { CGAL_assertion(d==N || d==0); this->init(d ); }
Bbox_d(int d, double range) { CGAL_assertion(d==N || d==0); this->init(d, range); }
Bbox_d() { this->init(N ); }
Bbox_d(double range) { this->init(N, range); }
template <typename I>
Bbox_d(int d, I b, I e) { CGAL_assertion(d==N || d==0); this->init(d, b, e); }
Bbox_d(I b, I e) { this->init(N, b, e); }

Bbox_d(const Bbox_2& bb2){ this->init(bb2);}
Bbox_d(const Bbox_3& bb3){ this->init(bb3);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1021,8 +1021,7 @@ template<class R_> struct Construct_bbox : private Store_kernel<R_> {
result_type operator()(Point const&a)const{
CI ci(this->kernel());
typename Real_embeddable_traits<RT>::To_interval f;
typename Get_functor<R, Point_dimension_tag>::type pd(this->kernel());
return result_type(pd(a), make_transforming_iterator(ci(a, Begin_tag()), f), make_transforming_iterator(ci(a, End_tag()), f));
return result_type(make_transforming_iterator(ci(a, Begin_tag()), f), make_transforming_iterator(ci(a, End_tag()), f));
}
};
}
Expand Down

0 comments on commit 5714884

Please sign in to comment.