From 028d3cfc7367c6042e2c7ff957c86cdbfe264cc7 Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Thu, 3 Apr 2008 11:56:16 +0000 Subject: [PATCH] Add missing operator==(CGAL_NULL_TYPE) for the Face_circulator. Other cleanups. --- .../CGAL/Triangulation_ds_circulators_3.h | 64 +++++++++++-------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_ds_circulators_3.h b/Triangulation_3/include/CGAL/Triangulation_ds_circulators_3.h index 0446c268f4c..8f4d3cf0d41 100644 --- a/Triangulation_3/include/CGAL/Triangulation_ds_circulators_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_ds_circulators_3.h @@ -43,30 +43,6 @@ class Triangulation_ds_cell_circulator_3 typedef Triangulation_ds_cell_circulator_3 Cell_circulator; public: -#ifdef CGAL_T3_USE_ITERATOR_AS_HANDLE - bool operator==(Cell_handle ch) const - { - return ch == pos; - } - - bool operator!=(Cell_handle ch) const - { - return ch != pos; - } - - - bool operator==(CGAL_NULL_TYPE CGAL_triangulation_assertion_code(n)) const - { - CGAL_triangulation_assertion( n == NULL); - return pos == Cell_handle(); - } - - bool operator!=(CGAL_NULL_TYPE CGAL_triangulation_assertion_code(n)) const - { - CGAL_triangulation_assertion( n == NULL); - return pos != Cell_handle(); - } -#endif Triangulation_ds_cell_circulator_3() : _s(), _t(), pos() @@ -160,6 +136,29 @@ public: return ! (*this == ccir); } +#ifdef CGAL_T3_USE_ITERATOR_AS_HANDLE + bool operator==(Cell_handle ch) const + { + return ch == pos; + } + + bool operator!=(Cell_handle ch) const + { + return ch != pos; + } +#endif + + bool operator==(CGAL_NULL_TYPE CGAL_triangulation_assertion_code(n)) const + { + CGAL_triangulation_assertion( n == NULL); + return pos == Cell_handle(); + } + + bool operator!=(CGAL_NULL_TYPE n) const + { + return ! (*this == n); + } + // For TDS's private use only. Cell_handle base() const { return pos; } #ifdef CGAL_T3_USE_ITERATOR_AS_HANDLE @@ -178,6 +177,7 @@ private: #ifdef CGAL_T3_USE_ITERATOR_AS_HANDLE template < class Tds_ > +inline bool operator==(typename Tds_::Cell_handle ch, Triangulation_ds_cell_circulator_3 cc) { @@ -185,6 +185,7 @@ operator==(typename Tds_::Cell_handle ch, Triangulation_ds_cell_circulator_3 +inline bool operator!=(typename Tds_::Cell_handle ch, Triangulation_ds_cell_circulator_3 cc) { @@ -369,7 +370,7 @@ public: return ! (*this == ccir); } - bool operator==(CGAL_NULL_TYPE c) const + bool operator==(CGAL_NULL_TYPE CGAL_triangulation_assertion_code(c)) const { CGAL_triangulation_assertion(c == CGAL_NULL); return pos == Cell_handle(); @@ -469,10 +470,21 @@ public: return ! (*this == ccir); } + bool operator==(CGAL_NULL_TYPE CGAL_triangulation_assertion_code(c)) const + { + CGAL_triangulation_assertion(c == CGAL_NULL); + return pos == Cell_handle(); + } + + bool operator!=(CGAL_NULL_TYPE c) const + { + return ! (*this == c); + } + // For TDS's private use only. Cell_handle base() const { return pos; } #ifdef CGAL_T3_USE_ITERATOR_AS_HANDLE - operator Cell_handle()const { return pos; } + operator Cell_handle() const { return pos; } #endif private: