mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 10:25:18 +00:00
fix crashes due to my last commit
This commit is contained in:
parent
bb26f219fe
commit
f30e8ccec3
|
@ -40,7 +40,9 @@ class sls_tracker {
|
|||
|
||||
struct value_score {
|
||||
value_score() : m(nullptr), value(unsynch_mpz_manager::mk_z(0)), score(0.0), score_prune(0.0), has_pos_occ(0), has_neg_occ(0), distance(0), touched(1) {};
|
||||
value_score(value_score&&) noexcept = default;
|
||||
~value_score() { if (m) m->del(value); }
|
||||
value_score& operator=(value_score&&) = default;
|
||||
unsynch_mpz_manager * m;
|
||||
mpz value;
|
||||
double score;
|
||||
|
|
|
@ -29,6 +29,7 @@ class mpq {
|
|||
public:
|
||||
mpq(int v):m_num(v), m_den(1) {}
|
||||
mpq():m_den(1) {}
|
||||
mpq(mpq &&) noexcept = default;
|
||||
mpq & operator=(mpq const &) = delete;
|
||||
void swap(mpq & other) { m_num.swap(other.m_num); m_den.swap(other.m_den); }
|
||||
mpz const & numerator() const { return m_num; }
|
||||
|
|
|
@ -102,6 +102,15 @@ public:
|
|||
mpz(int v):m_val(v), m_kind(mpz_small), m_owner(mpz_self), m_ptr(nullptr) {}
|
||||
mpz():m_val(0), m_kind(mpz_small), m_owner(mpz_self), m_ptr(nullptr) {}
|
||||
mpz(mpz_type* ptr): m_val(0), m_kind(mpz_small), m_owner(mpz_ext), m_ptr(ptr) { SASSERT(ptr);}
|
||||
mpz(mpz && other) noexcept : m_val(other.m_val), m_kind(other.m_kind), m_owner(other.m_owner), m_ptr(nullptr) {
|
||||
std::swap(m_ptr, other.m_ptr);
|
||||
}
|
||||
|
||||
mpz& operator=(mpz &&other) {
|
||||
swap(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void swap(mpz & other) {
|
||||
std::swap(m_val, other.m_val);
|
||||
std::swap(m_ptr, other.m_ptr);
|
||||
|
|
Loading…
Reference in a new issue