From 38a23a84a739f7b895ba7d50a15cd1f37ada6957 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Mon, 19 Jul 2021 17:38:07 +0100 Subject: [PATCH] Remove redundant comparison functors --- Nef_3/include/CGAL/Nef_3/K3_tree.h | 26 ----------- Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h | 43 ------------------- 2 files changed, 69 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/K3_tree.h b/Nef_3/include/CGAL/Nef_3/K3_tree.h index 25fb6c76df1..dc819e5f607 100644 --- a/Nef_3/include/CGAL/Nef_3/K3_tree.h +++ b/Nef_3/include/CGAL/Nef_3/K3_tree.h @@ -62,32 +62,6 @@ private: Coordinate coord; }; - -template - class Smaller_than, Vertex, Coordinate> -{ -public: - Smaller_than(Coordinate c) : coord(c) { - CGAL_assertion( c >= 0 && c <=2); - } - bool operator()( const Vertex& v1, const Vertex& v2) { - switch(coord) { - case 0: return CGAL::to_interval(v1->point().x()).second < - CGAL::to_interval(v2->point().x()).first; - case 1: return CGAL::to_interval(v1->point().y()).second < - CGAL::to_interval(v2->point().y()).first; - case 2: return CGAL::to_interval(v1->point().z()).second < - CGAL::to_interval(v2->point().z()).first; - default: CGAL_error(); - } - return false; - } - -private: - Coordinate coord; -}; - - public: friend class Objects_along_ray; friend class Objects_around_segment; diff --git a/Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h b/Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h index 38201f2ce18..dffe54492bc 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h @@ -56,49 +56,6 @@ private: }; -template -class Compare_points, Coordinate> { - - typedef CGAL::Lazy_kernel Kernel; - typedef typename Kernel::Point_3 Point_3; - public: - Compare_points(Coordinate c) : coord(c) { - CGAL_assertion( c >= 0 && c <=2); - } - CGAL::Comparison_result operator()( const Point_3& p1, const Point_3& p2) { - switch(coord) { - case 0: - if(CGAL::to_interval(p1.x()).second < - CGAL::to_interval(p2.x()).first) - return CGAL::SMALLER; - else if(CGAL::to_interval(p2.x()).second < - CGAL::to_interval(p1.x()).first) - return CGAL::LARGER; - return CGAL::EQUAL; - case 1: - if(CGAL::to_interval(p1.y()).second < - CGAL::to_interval(p2.y()).first) - return CGAL::SMALLER; - else if(CGAL::to_interval(p2.y()).second < - CGAL::to_interval(p1.y()).first) - return CGAL::LARGER; - return CGAL::EQUAL; - case 2: - if(CGAL::to_interval(p1.z()).second < - CGAL::to_interval(p2.z()).first) - return CGAL::SMALLER; - else if(CGAL::to_interval(p2.z()).second < - CGAL::to_interval(p1.z()).first) - return CGAL::LARGER; - return CGAL::EQUAL; - default: CGAL_error(); - } - return CGAL::EQUAL; - } -private: - Coordinate coord; -}; - template class Side_of_plane {