From 0798f093d44aa7a0479feb8e8f00d6c6ae0ca722 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 3 Jan 2014 16:20:59 +0100 Subject: [PATCH] hardcode the use of std::size_t as id_type for PVertex --- Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h | 22 ++++++++----------- Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h | 2 +- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index 853173c17f4..a3787237c44 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -966,19 +966,18 @@ private: /** * to be used by the perturber */ - template class Cell_from_ids - : CGAL::cpp11::array + : CGAL::cpp11::array { public: Cell_from_ids(const Cell_handle& c) : vertices_() { for(std::size_t i = 0; i < 4; ++i) - vertices_[i] = static_cast(c->vertex(i)->meshing_info()); + vertices_[i] = static_cast(c->vertex(i)->meshing_info()); } - VertexIdType vertex_id(const std::size_t& i) const + std::size_t vertex_id(const std::size_t& i) const { CGAL_precondition(i >= 0 && i < 4); return vertices_[i]; @@ -988,15 +987,12 @@ private: // vertices IDs // they should be ordered in the same way as they were in the // cell to be backed-up - CGAL::cpp11::array vertices_; + CGAL::cpp11::array vertices_; }; - template + template class Cell_data_backup { - typedef Cell_from_ids Cell_from_ids; - public: Cell_data_backup(const Cell_handle& c) : cell_ids_(c) @@ -1033,8 +1029,8 @@ private: IndexMap new_to_old_indices; for(std::size_t i = 0; i < 4; ++i) { - VertexIdType new_vi_index = - static_cast(new_cell->vertex(i)->meshing_info()); + std::size_t new_vi_index = + static_cast(new_cell->vertex(i)->meshing_info()); for(std::size_t j = 0; j < 4; ++j) { if(new_vi_index == cell_ids_.vertex_id(j)) @@ -1760,7 +1756,7 @@ update_mesh_no_topo_change(const Point_3& new_position, Point_3 old_position = vertex->point(); //backup metadata - typedef Cell_data_backup Cell_data_backup; + typedef Cell_data_backup Cell_data_backup; std::vector cells_backup; fill_cells_backup(conflict_cells, cells_backup); @@ -1837,7 +1833,7 @@ update_mesh_topo_change(const Point_3& new_position, Point_3 old_position = old_vertex->point(); //backup metadata - typedef Cell_data_backup Cell_data_backup; + typedef Cell_data_backup Cell_data_backup; std::vector cells_backup; fill_cells_backup(conflict_cells, cells_backup); diff --git a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h index 94f535e0d16..beb85eaea9a 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h +++ b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h @@ -108,7 +108,7 @@ private: class PVertex { public: - typedef unsigned int id_type; + typedef std::size_t id_type; /// Constructor PVertex()