From c900eabfcd8bc26bf8645c735063a3b6d34173d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 28 Jun 2013 16:28:34 +0200 Subject: [PATCH] iterators in HDS and Triangulations are bi-directional --- .../boost/graph/graph_traits_HalfedgeDS.h | 22 +++++++++++++++++++ .../graph/graph_traits_Triangulation_2.h | 11 ++++++++++ 2 files changed, 33 insertions(+) diff --git a/BGL/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h b/BGL/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h index 7689590e2e1..eb492850d38 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h @@ -126,6 +126,17 @@ public: ++*this; return tmp; } + + Self& operator--() { + --nt; + return *this; + } + + Self operator--(int) { + Self tmp = *this; + --*this; + return tmp; + } }; template < class HDS > @@ -197,6 +208,17 @@ public: ++*this; return tmp; } + + Self& operator--() { + --nt; + return *this; + } + + Self operator--(int) { + Self tmp = *this; + --*this; + return tmp; + } }; template < class HDS > diff --git a/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h b/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h index c63da2e0be4..39b3d5bff11 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h @@ -176,6 +176,17 @@ public: ++*this; return tmp; } + + Self& operator--() { + --nt; + return *this; + } + + Self operator--(int) { + Self tmp = *this; + --*this; + return tmp; + } };