mirror of
https://github.com/Z3Prover/z3
synced 2025-10-05 23:43:59 +00:00
remove unneeded iterator functions
This commit is contained in:
parent
737c2208fa
commit
499ed5d844
32 changed files with 27 additions and 87 deletions
|
@ -51,9 +51,8 @@ class emonics {
|
|||
unsigned m_index;
|
||||
};
|
||||
struct head_tail {
|
||||
head_tail(): m_head(nullptr), m_tail(nullptr) {}
|
||||
cell* m_head;
|
||||
cell* m_tail;
|
||||
cell* m_head = nullptr;
|
||||
cell* m_tail = nullptr;
|
||||
};
|
||||
struct hash_canonical {
|
||||
emonics& em;
|
||||
|
@ -205,7 +204,6 @@ public:
|
|||
monic & operator*() { return m.m_monics[m_cell->m_index]; }
|
||||
iterator& operator++() { m_touched = true; m_cell = m_cell->m_next; return *this; }
|
||||
iterator operator++(int) { iterator tmp = *this; ++*this; return tmp; }
|
||||
bool operator==(iterator const& other) const { return m_cell == other.m_cell && m_touched == other.m_touched; }
|
||||
bool operator!=(iterator const& other) const { return m_cell != other.m_cell || m_touched != other.m_touched; }
|
||||
};
|
||||
|
||||
|
@ -239,7 +237,6 @@ public:
|
|||
}
|
||||
pf_iterator& operator++() { ++m_it; fast_forward(); return *this; }
|
||||
pf_iterator operator++(int) { pf_iterator tmp = *this; ++*this; return tmp; }
|
||||
bool operator==(pf_iterator const& other) const { return m_it == other.m_it; }
|
||||
bool operator!=(pf_iterator const& other) const { return m_it != other.m_it; }
|
||||
};
|
||||
|
||||
|
|
|
@ -106,11 +106,10 @@ public:
|
|||
iterator(bool run_on_vector, pair_vec::const_iterator vi, ci_set::iterator cii) :
|
||||
m_run_on_vector(run_on_vector), m_vi(vi), m_ci(cii)
|
||||
{}
|
||||
bool operator==(const iterator &other) const {
|
||||
bool operator!=(const iterator &other) const {
|
||||
SASSERT(m_run_on_vector == other.m_run_on_vector);
|
||||
return m_run_on_vector? m_vi == other.m_vi : m_ci == other.m_ci;
|
||||
return m_run_on_vector ? m_vi != other.m_vi : m_ci != other.m_ci;
|
||||
}
|
||||
bool operator!=(const iterator &other) const { return !(*this == other); }
|
||||
};
|
||||
|
||||
iterator begin() const {
|
||||
|
|
|
@ -97,14 +97,12 @@ const_iterator_mon::const_iterator_mon(const bool_vector& mask, const factorizat
|
|||
m_ff(f) ,
|
||||
m_full_factorization_returned(false)
|
||||
{}
|
||||
|
||||
bool const_iterator_mon::operator==(const const_iterator_mon::self_type &other) const {
|
||||
return
|
||||
m_full_factorization_returned == other.m_full_factorization_returned &&
|
||||
m_mask == other.m_mask;
|
||||
}
|
||||
|
||||
bool const_iterator_mon::operator!=(const const_iterator_mon::self_type &other) const { return !(*this == other); }
|
||||
bool const_iterator_mon::operator!=(const const_iterator_mon::self_type &other) const {
|
||||
return
|
||||
m_full_factorization_returned != other.m_full_factorization_returned ||
|
||||
m_mask != other.m_mask;
|
||||
}
|
||||
|
||||
factorization const_iterator_mon::create_binary_factorization(factor j, factor k) const {
|
||||
factorization f(nullptr);
|
||||
|
|
|
@ -88,8 +88,7 @@ struct const_iterator_mon {
|
|||
self_type operator++(int);
|
||||
|
||||
const_iterator_mon(const bool_vector& mask, const factorization_factory *f);
|
||||
|
||||
bool operator==(const self_type &other) const;
|
||||
|
||||
bool operator!=(const self_type &other) const;
|
||||
|
||||
factorization create_binary_factorization(factor j, factor k) const;
|
||||
|
|
|
@ -203,7 +203,6 @@ public:
|
|||
lar_base_constraint const* operator->() const { return &cs[m_index]; }
|
||||
iterator& operator++() { next(); return *this; }
|
||||
iterator operator++(int) { auto tmp = *this; next(); return tmp; }
|
||||
bool operator==(iterator const& other) const { return m_index == other.m_index; }
|
||||
bool operator!=(iterator const& other) const { return m_index != other.m_index; }
|
||||
};
|
||||
iterator begin() const { return iterator(cs, 0); }
|
||||
|
@ -229,7 +228,6 @@ public:
|
|||
constraint_index const* operator->() const { return &m_index; }
|
||||
iterator& operator++() { next(); return *this; }
|
||||
iterator operator++(int) { auto tmp = *this; next(); return tmp; }
|
||||
bool operator==(iterator const& other) const { return m_index == other.m_index; }
|
||||
bool operator!=(iterator const& other) const { return m_index != other.m_index; }
|
||||
};
|
||||
iterator begin() const { return iterator(cs, 0); }
|
||||
|
|
|
@ -170,8 +170,7 @@ public:
|
|||
const_iterator operator++() { const_iterator i = *this; m_it++; return i; }
|
||||
const_iterator operator++(int) { m_it++; return *this; }
|
||||
const_iterator(u_map<mpq>::iterator it) : m_it(it) {}
|
||||
bool operator==(const const_iterator &other) const { return m_it == other.m_it; }
|
||||
bool operator!=(const const_iterator &other) const { return !(*this == other); }
|
||||
bool operator!=(const const_iterator &other) const { return m_it != other.m_it; }
|
||||
};
|
||||
|
||||
bool is_normalized() const {
|
||||
|
|
|
@ -302,7 +302,6 @@ public:
|
|||
return signed_var(m_idx);
|
||||
}
|
||||
iterator& operator++() { m_idx = m_ve.m_uf.next(m_idx); m_touched = true; return *this; }
|
||||
bool operator==(iterator const& other) const { return m_idx == other.m_idx && m_touched == other.m_touched; }
|
||||
bool operator!=(iterator const& other) const { return m_idx != other.m_idx || m_touched != other.m_touched; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue