From daab96982ec61218c2bb91796b6f87f1e5e376b5 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 8 Apr 2020 09:23:59 +0200 Subject: [PATCH] Bugfix --- Generalized_map/include/CGAL/Generalized_map.h | 2 +- .../include/CGAL/Generalized_map_storages.h | 4 +++- .../include/CGAL/GMap_linear_cell_complex_storages.h | 4 +++- .../include/CGAL/Linear_cell_complex_base.h | 1 + Surface_mesh_topology/include/CGAL/Path_on_surface.h | 10 +++++----- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Generalized_map/include/CGAL/Generalized_map.h b/Generalized_map/include/CGAL/Generalized_map.h index d85cd773266..27512a98a1f 100644 --- a/Generalized_map/include/CGAL/Generalized_map.h +++ b/Generalized_map/include/CGAL/Generalized_map.h @@ -105,7 +105,7 @@ namespace CGAL { typedef typename Base::Null_handle_type Null_handle_type; using Base::null_handle; - + using Base::null_dart_handle; using Base::mdarts; using Base::get_alpha; using Base::is_free; diff --git a/Generalized_map/include/CGAL/Generalized_map_storages.h b/Generalized_map/include/CGAL/Generalized_map_storages.h index 51200c733fa..a149dd19ede 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages.h @@ -103,7 +103,7 @@ namespace CGAL { // Init void init_storage() - {} + { null_dart_handle=nullptr; } /** Return if this dart is free for adimension. * @param dh a dart handle @@ -402,6 +402,8 @@ namespace CGAL { } protected: + Dart_handle null_dart_handle; // To be compatible with combinatorial map + /// Dart container. Dart_container mdarts; diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h index 6c91c0af856..e9c333e4aae 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h @@ -122,7 +122,7 @@ namespace CGAL { // Init void init_storage() - {} + { null_dart_handle=nullptr; } /** Return if this dart is free for adimension. * @param dh a dart handle @@ -435,6 +435,8 @@ namespace CGAL { } protected: + Dart_handle null_dart_handle; // To be compatible with combinatorial map + /// Dart container. Dart_container mdarts; diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h index 14c5be6fbe6..9e771fff9d9 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h @@ -112,6 +112,7 @@ namespace CGAL { using Base::create_dart; using Base::attribute; using Base::null_handle; + using Base::null_dart_handle; using Base::point_of_vertex_attribute; using Base::other_extremity; using Base::darts; diff --git a/Surface_mesh_topology/include/CGAL/Path_on_surface.h b/Surface_mesh_topology/include/CGAL/Path_on_surface.h index f10b2823ae5..b61b499307e 100644 --- a/Surface_mesh_topology/include/CGAL/Path_on_surface.h +++ b/Surface_mesh_topology/include/CGAL/Path_on_surface.h @@ -246,7 +246,7 @@ public: Dart_const_handle get_ith_real_dart(std::size_t i) const { CGAL_assertion(i(m_path[i])) { - m_path[i]=get_map().template opposite2(m_path[i]); + m_path[i]=get_map().opposite2(m_path[i]); m_flip[i]=!m_flip[i]; } else if (show_flips_left) @@ -562,7 +562,7 @@ public: while (!get_map().darts().is_used(index) || (!get_map().template is_free<2>(get_map().dart_handle(index)) && get_map().dart_handle(index)>get_map(). - template opposite2(get_map().dart_handle(index)))) + opposite2(get_map().dart_handle(index)))) { ++index; if (index==get_map().darts().capacity()) index=0; @@ -945,7 +945,7 @@ public: /* This assert is long if (!m_map.darts().owns(m_path[i])) { return false; } */ - if (m_path[i]==m_map.null_dart_handle) + if (m_path[i]==Map::null_handle || m_path[i]==m_map.null_dart_handle) { return false; } last_vertex=m_flip[i-1]?m_path[i-1]:get_map().next(m_path[i-1]);