From 071237f20882db0e0d2ba3423e884fc5fe1f7d07 Mon Sep 17 00:00:00 2001 From: Radu Ursu Date: Wed, 29 Oct 2003 15:30:41 +0000 Subject: [PATCH] Version 1.174 (29 October 03) - fixed files for _MSC_VER but not INTEL --- Packages/Triangulation_3/changes.txt | 3 +++ .../CGAL/Triangulation_data_structure_3.h | 19 +++++++++++++++---- .../CGAL/Triangulation_ds_iterators_3.h | 4 ++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Packages/Triangulation_3/changes.txt b/Packages/Triangulation_3/changes.txt index 0074eba5576..40733c5afcf 100644 --- a/Packages/Triangulation_3/changes.txt +++ b/Packages/Triangulation_3/changes.txt @@ -1,3 +1,6 @@ +Version 1.174 (29 October 03) +- fixed files for _MSC_VER but not INTEL + Version 1.173 (20 October 03) - Doc fixes - New program example_regular.C diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_data_structure_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_data_structure_3.h index 8c4b580c261..7445c3e6745 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_data_structure_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_data_structure_3.h @@ -36,6 +36,10 @@ #include +#if !defined _MSC_VER || defined __INTEL_COMPILER +# define CGAL_T3_USE_ITERATOR_AS_HANDLE +#endif + #include #include #include @@ -91,10 +95,10 @@ public: //private: // In 2D only : typedef Triangulation_ds_face_circulator_3 Face_circulator; - +#ifdef CGAL_T3_USE_ITERATOR_AS_HANDLE typedef Vertex_iterator Vertex_handle; typedef Cell_iterator Cell_handle; - /* +#else // Defining nested classes for the handles instead of typedefs // considerably shortens the symbol names (and compile times). // It makes error messages more readable as well. @@ -168,7 +172,7 @@ public: void * for_compact_container() const { return _c.for_compact_container(); } void * & for_compact_container() { return _c.for_compact_container(); } }; - */ +#endif typedef std::pair Facet; typedef Triple Edge; @@ -335,7 +339,11 @@ public: void delete_vertex( const Vertex_handle& v ) { CGAL_triangulation_expensive_precondition( is_vertex(v) ); +#ifdef CGAL_T3_USE_ITERATOR_AS_HANDLE vertex_container().erase(v); +#else + vertex_container().erase(v.base()); +#endif } void delete_cell( const Cell_handle& c ) @@ -348,8 +356,11 @@ public: is_edge(c,0,1) ); CGAL_triangulation_expensive_precondition( dimension() != 0 || is_vertex(c->vertex(0)) ); - +#ifdef CGAL_T3_USE_ITERATOR_AS_HANDLE cell_container().erase(c); +#else + cell_container().erase(c.base()); +#endif } template diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_ds_iterators_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_ds_iterators_3.h index 041b7b3f098..ae457cc5602 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_ds_iterators_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_ds_iterators_3.h @@ -236,7 +236,11 @@ public: Cell_circulator ccir = _tds->incident_cells(edge); do { ++ccir; +#ifdef CGAL_T3_USE_ITERATOR_AS_HANDLE } while ( pos < ccir ); +#else + } while ( Cell_handle(pos) < Cell_handle(ccir) ); +#endif // loop terminates since it stops at least when ccir = pos if ( Cell_handle(ccir) == Cell_handle(pos) ) // pos is the cell with minimal pointer