From 57148840c85708418966f663d4d0be15eb4e39f2 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 10 Feb 2025 14:44:49 +0000 Subject: [PATCH] Remove d of Bbox_d constructor --- .../CGAL/Frechet_distance/internal/Neighbor_search.h | 4 ++-- Kernel_d/doc/Kernel_d/CGAL/Bbox_d.h | 2 +- NewKernel_d/include/CGAL/Bbox_d.h | 6 +++--- .../include/CGAL/NewKernel_d/function_objects_cartesian.h | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Frechet_distance/include/CGAL/Frechet_distance/internal/Neighbor_search.h b/Frechet_distance/include/CGAL/Frechet_distance/internal/Neighbor_search.h index 7b8b966f7700..8b43d147e946 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance/internal/Neighbor_search.h +++ b/Frechet_distance/include/CGAL/Frechet_distance/internal/Neighbor_search.h @@ -230,10 +230,10 @@ auto FrechetKdTree::to_kd_tree_point(const Polyline& curve) -> Point_d res.ends[0] = curve.front(); res.ends[1] = curve.back(); - Bbox_d> bb(dim); + Bbox_d> bb; for (auto const& point : curve) { Bbox_d> bbb = construct_bbox(point); - bb += bbb; + bb += bbb; } res.bbox.reserve(2*dim); for(auto it = bb.cartesian_begin(); it != bb.cartesian_end(); ++it){ diff --git a/Kernel_d/doc/Kernel_d/CGAL/Bbox_d.h b/Kernel_d/doc/Kernel_d/CGAL/Bbox_d.h index 5d7c3843a637..13b12dfde1d6 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Bbox_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Bbox_d.h @@ -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::%infinity()`. */ Bbox_d(); diff --git a/NewKernel_d/include/CGAL/Bbox_d.h b/NewKernel_d/include/CGAL/Bbox_d.h index 9c1c82f6a327..7b396912f37b 100644 --- a/NewKernel_d/include/CGAL/Bbox_d.h +++ b/NewKernel_d/include/CGAL/Bbox_d.h @@ -188,10 +188,10 @@ class Bbox_d> : public Impl::Bbox, Bbox_d using Cartesian_const_iterator = Concatenate_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 - 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);} diff --git a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h index 523710b8b443..2f14438ab605 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h @@ -1021,8 +1021,7 @@ template struct Construct_bbox : private Store_kernel { result_type operator()(Point const&a)const{ CI ci(this->kernel()); typename Real_embeddable_traits::To_interval f; - typename Get_functor::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)); } }; }