From ea62c316aeae88a2e142dab2ed405cc875b3b28e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Sun, 23 Apr 2023 22:35:45 +0200 Subject: [PATCH] boost::lambda -> c++11 lambda --- AABB_tree/include/CGAL/AABB_tree.h | 5 ++--- Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h | 6 +----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index 0016d4ecc09..3f49779b6ac 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -27,7 +27,6 @@ #include #include #include -#include #ifdef CGAL_HAS_THREADS #include @@ -326,7 +325,7 @@ public: boost::optional< typename Intersection_and_primitive_id::Type > first_intersection(const Ray& query) const { - return first_intersection(query, boost::lambda::constant(false)); + return first_intersection(query, [](Primitive_id){ return false; }); } /// \endcond @@ -351,7 +350,7 @@ public: boost::optional first_intersected_primitive(const Ray& query) const { - return first_intersected_primitive(query, boost::lambda::constant(false)); + return first_intersected_primitive(query, [](Primitive_id){ return false; }); } /// \endcond ///@} diff --git a/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h b/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h index 4c6dacd7802..6c380f054f2 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h +++ b/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h @@ -33,8 +33,6 @@ #include #include -#include -#include #include #include @@ -329,7 +327,7 @@ private: typename FT_list::iterator pos = std::find_if( big_moves_.begin(), big_moves_.end(), - boost::lambda::_1 < new_sq_move ); + [&](const FT& v) { return v< new_sq_move; } ); big_moves_.insert(pos, new_sq_move); } @@ -343,8 +341,6 @@ private: bool check_convergence() const { - namespace bl = boost::lambda; - FT sum(0); for(typename FT_list::const_iterator it = big_moves_.begin(); it != big_moves_.end();