From 468dde773d18bbff990fecf12f327d06ae2be186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 20 Dec 2024 16:00:20 +0100 Subject: [PATCH] Use a clearer name than "Static_filtered_predicate" for EPECK static filters --- ..._predicate.h => EPIC_predicate_if_convertible.h} | 8 ++++---- Filtered_kernel/include/CGAL/Lazy_kernel.h | 13 ++++++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) rename Filtered_kernel/include/CGAL/{Static_filtered_predicate.h => EPIC_predicate_if_convertible.h} (88%) diff --git a/Filtered_kernel/include/CGAL/Static_filtered_predicate.h b/Filtered_kernel/include/CGAL/EPIC_predicate_if_convertible.h similarity index 88% rename from Filtered_kernel/include/CGAL/Static_filtered_predicate.h rename to Filtered_kernel/include/CGAL/EPIC_predicate_if_convertible.h index 9353ce9b5b3..37c47e7edb5 100644 --- a/Filtered_kernel/include/CGAL/Static_filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/EPIC_predicate_if_convertible.h @@ -9,15 +9,15 @@ // // Author(s) : Andreas Fabri, Laurent Rineau -#ifndef CGAL_STATIC_FILTERED_PREDICATE_H -#define CGAL_STATIC_FILTERED_PREDICATE_H +#ifndef CGAL_EPIC_PREDICATE_IF_CONVERTIBLE_H +#define CGAL_EPIC_PREDICATE_IF_CONVERTIBLE_H #include namespace CGAL { template -class Static_filtered_predicate { +class EPIC_predicate_if_convertible { public: FP fp; EpicP epicp; @@ -54,4 +54,4 @@ public: } // CGAL -#endif // CGAL_STATIC_FILTERED_PREDICATE_H +#endif // CGAL_EPIC_PREDICATE_IF_CONVERTIBLE_H diff --git a/Filtered_kernel/include/CGAL/Lazy_kernel.h b/Filtered_kernel/include/CGAL/Lazy_kernel.h index e8da43f432f..8f94a5301e6 100644 --- a/Filtered_kernel/include/CGAL/Lazy_kernel.h +++ b/Filtered_kernel/include/CGAL/Lazy_kernel.h @@ -86,7 +86,7 @@ public: #ifdef CGAL_NO_STATIC_FILTERS_FOR_LAZY_KERNEL enum { Has_static_filters = false }; #else - // @fixme, this should be 'true' but it's broken because Conditional_EPIC_predicate + // @fixme, this should be 'true' but it's broken because EPIC_predicate_if_convertible // assumes the static filtered predicate and the (non-static) filtered predicate // have the same signature, which is not always the case, for example in // Do_intersect_3(Sphere_3, Bbox_3, *bool*) @@ -137,8 +137,15 @@ public: typedef Filtered_predicate P; \ P Pf() const { return P(); } #else -#define CGAL_Kernel_pred(P, Pf) \ - typedef Static_filtered_predicate, Exact_predicates_inexact_constructions_kernel::P> P; \ +// - the first template parameter is because either it fits in a double, or not, so +// we might as well use the approximate kernel directly rather than the complete lazy kernel +// - the second is the predicate to be called if EPICK is not usable +// - the third is the equivalent predicate in EPICK +#define CGAL_Kernel_pred(P, Pf) \ + typedef EPIC_predicate_if_convertible, \ + Exact_predicates_inexact_constructions_kernel::P> P; \ P Pf() const { return P(); } #endif