summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-09-18 13:08:37 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-09-18 13:08:37 +0200
commit8afdbebe27effb0a9c184a153b645dd85aa0415b (patch)
tree6c980b290d99a487d590a6f647918dc97b07192a
parent77c0275031f47bb94f94d02d63182178e46f6570 (diff)
Fix #if cgal_version
-rw-r--r--src/Alpha_complex/include/gudhi/Alpha_complex/Alpha_kernel_d.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex/Alpha_kernel_d.h b/src/Alpha_complex/include/gudhi/Alpha_complex/Alpha_kernel_d.h
index e3567a6d..a6760645 100644
--- a/src/Alpha_complex/include/gudhi/Alpha_complex/Alpha_kernel_d.h
+++ b/src/Alpha_complex/include/gudhi/Alpha_complex/Alpha_kernel_d.h
@@ -108,18 +108,16 @@ class Alpha_kernel_d<Kernel, true> {
template<class PointIterator>
Sphere get_sphere(PointIterator begin, PointIterator end) const {
// power_center_d_object has been renamed between CGAL 5.1 and 5.2
-#if defined CGAL_VERSION_NR >= 1050101000 && defined CGAL_VERSION_NR < 1050201000
+#if CGAL_VERSION_NR < 1050201000
return kernel_.power_center_d_object()(begin, end);
-#endif
-#if CGAL_VERSION_NR >= 1050201000
+#else
return kernel_.construct_power_sphere_d_object()(begin, end);
#endif
}
template<class PointIterator>
FT get_squared_radius(PointIterator begin, PointIterator end) const {
- Sphere sph = get_sphere(begin, end);
- return sph.weight();
+ return get_sphere(begin, end).weight();
}
FT get_squared_radius(const Sphere& sph) const {
@@ -128,10 +126,9 @@ class Alpha_kernel_d<Kernel, true> {
bool is_gabriel(const Sphere& circumcenter, const Weighted_point_d& point) {
// power_center_d_object has been renamed between CGAL 5.1 and 5.2
-#if defined CGAL_VERSION_NR >= 1050101000 && defined CGAL_VERSION_NR < 1050201000
+#if CGAL_VERSION_NR < 1050201000
return kernel_.power_distance_d_object()(circumcenter, point) >= 0;
-#endif
-#if CGAL_VERSION_NR >= 1050201000
+#else
return kernel_.compute_power_product_d_object()(circumcenter, point) >= 0;
#endif
}