3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-05 15:33:59 +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

@ -94,7 +94,6 @@ namespace dimacs {
iterator(drat_parser& p, bool is_eof):p(p), m_eof(is_eof) { if (!m_eof) m_eof = !p.next(); }
drat_record const& operator*() { return p.m_record; }
iterator& operator++() { if (!p.next()) m_eof = true; return *this;}
bool operator==(iterator const& other) const { return m_eof == other.m_eof; }
bool operator!=(iterator const& other) const { return m_eof != other.m_eof; }
};

View file

@ -188,7 +188,6 @@ namespace sat {
iterator(clause_wrapper const& c, unsigned idx): m_idx(idx), m_cw(c) {}
iterator& operator++() { ++m_idx; return *this; }
literal operator*() { return m_cw[m_idx]; }
bool operator==(iterator const& other) const { SASSERT(&m_cw == &other.m_cw); return m_idx == other.m_idx; }
bool operator!=(iterator const& other) const { SASSERT(&m_cw == &other.m_cw); return m_idx != other.m_idx; }
};
iterator begin() const { return iterator(*this, 0); }

View file

@ -125,7 +125,6 @@ namespace pb {
iterator(constraint const& c, unsigned idx) : c(c), idx(idx) {}
literal operator*() { return c.get_lit(idx); }
iterator& operator++() { ++idx; return *this; }
bool operator==(iterator const& other) const { SASSERT(&c == &other.c); return idx == other.idx; }
bool operator!=(iterator const& other) const { SASSERT(&c == &other.c); return idx != other.idx; }
};