From 14cb9090ec3ef15efd487accfc3be3346bcc4aee Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Tue, 8 Jan 2019 21:53:10 +0100 Subject: [PATCH] Provide operator-- on SortedCellIndexIterator to fix #220 --- src/db/db/dbCellMapping.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/db/db/dbCellMapping.cc b/src/db/db/dbCellMapping.cc index 8888a9ebf..66490629d 100644 --- a/src/db/db/dbCellMapping.cc +++ b/src/db/db/dbCellMapping.cc @@ -72,13 +72,25 @@ struct SortedCellIndexIterator SortedCellIndexIterator &operator++() { ++m_n; - return *this; + return *this; } SortedCellIndexIterator &operator+=(size_t n) { m_n += n; - return *this; + return *this; + } + + SortedCellIndexIterator &operator--() + { + --m_n; + return *this; + } + + SortedCellIndexIterator &operator-=(size_t n) + { + m_n -= n; + return *this; } bool operator==(const SortedCellIndexIterator &d) const