3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

remove unneeded iterator functions

This commit is contained in:
Nuno Lopes 2024-09-23 12:57:54 +01:00
parent 737c2208fa
commit 499ed5d844
32 changed files with 27 additions and 87 deletions

View file

@ -197,10 +197,6 @@ public:
++*this;
return tmp;
}
bool operator==(iterator const & it) const {
return m_set == it.m_set;
}
bool operator!=(iterator const & it) const {
return m_set != it.m_set;

View file

@ -220,7 +220,6 @@ public:
bool operator*() const { return b.get(m_curr); }
iterator& operator++() { ++m_curr; return *this; }
iterator operator++(int) { iterator tmp = *this; ++* this; return tmp; }
bool operator==(iterator const& it) const { return m_curr == it.m_curr; }
bool operator!=(iterator const& it) const { return m_curr != it.m_curr; }
};

View file

@ -551,7 +551,6 @@ public:
return *this;
}
iterator operator++(int) { iterator tmp = *this; ++*this; return tmp; }
bool operator==(iterator const & it) const { return m_list_it == it.m_list_it; }
bool operator!=(iterator const & it) const { return m_list_it != it.m_list_it; }
};

View file

@ -95,7 +95,6 @@ public:
next_index();
return *this;
}
bool operator==(iterator const& other) const { return m_sz == other.m_sz; }
bool operator!=(iterator const& other) const { return m_sz != other.m_sz; }
};

View file

@ -213,13 +213,8 @@ public:
T const& operator*() const {
return *m_elem;
}
bool operator==(dll_iterator const& other) const {
return m_elem == other.m_elem && m_first == other.m_first;
}
bool operator!=(dll_iterator const& other) const {
return !operator==(other);
return m_elem != other.m_elem || m_first != other.m_first;
}
};

View file

@ -44,7 +44,6 @@ public:
T const & operator*() const { return m_curr->head(); }
iterator & operator++() { m_curr = m_curr->tail(); return *this; }
iterator operator++(int) { iterator tmp = *this; ++*this; return tmp; }
bool operator==(iterator const & it) { return m_curr == it.m_curr; }
bool operator!=(iterator const & it) { return m_curr != it.m_curr; }
};

View file

@ -106,8 +106,7 @@ public:
unsigned m_index;
public:
iterator(scoped_vector const& v, unsigned idx): m_vec(v), m_index(idx) {}
bool operator==(iterator const& other) const { return &other.m_vec == &m_vec && other.m_index == m_index; }
bool operator!=(iterator const& other) const { return &other.m_vec != &m_vec || other.m_index != m_index; }
T const& operator*() { return m_vec[m_index]; }

View file

@ -194,7 +194,6 @@ public:
SASSERT(invariant());
}
unsigned operator*() const { return m_index; }
bool operator==(iterator const& it) const { return m_index == it.m_index; }
bool operator!=(iterator const& it) const { return m_index != it.m_index; }
iterator & operator++() { ++m_index; scan(); return *this; }
iterator operator++(int) { iterator tmp = *this; ++*this; return tmp; }

View file

@ -311,9 +311,6 @@ public:
return *this;
}
bool operator==(reverse_iterator const& other) const {
return other.v == v;
}
bool operator!=(reverse_iterator const& other) const {
return other.v != v;
}
@ -883,9 +880,6 @@ public:
return *this;
}
bool operator==(reverse_iterator const& other) const {
return other.v == v;
}
bool operator!=(reverse_iterator const& other) const {
return other.v != v;
}