summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/ring.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx
index 8796dd0e50d5..bca6dba07f0a 100644
--- a/sw/inc/ring.hxx
+++ b/sw/inc/ring.hxx
@@ -188,7 +188,12 @@ namespace sw
void increment()
{ m_pCurrent = m_pCurrent ? m_pCurrent->GetNext() : m_pStart->GetNext(); }
bool equal(RingIterator const& other) const
- { return m_pCurrent == other.m_pCurrent && m_pStart == other.m_pStart; }
+ {
+ // we never want to compare iterators from
+ // different rings or starting points
+ assert(m_pStart == other.m_pStart);
+ return m_pCurrent == other.m_pCurrent;
+ }
T& dereference() const
{ return m_pCurrent ? *m_pCurrent : * m_pStart; }
/**