diff --git a/src/smt/old_interval.cpp b/src/smt/old_interval.cpp index 48fd7d69a..c0e52c17b 100644 --- a/src/smt/old_interval.cpp +++ b/src/smt/old_interval.cpp @@ -227,16 +227,6 @@ interval::interval(v_dependency_manager & m, rational const & val, bool open, bo } } -interval::interval(interval const & other): - m_manager(other.m_manager), - m_lower(other.m_lower), - m_upper(other.m_upper), - m_lower_open(other.m_lower_open), - m_upper_open(other.m_upper_open), - m_lower_dep(other.m_lower_dep), - m_upper_dep(other.m_upper_dep) { -} - interval & interval::operator=(interval const & other) { m_lower = other.m_lower; m_upper = other.m_upper; diff --git a/src/smt/old_interval.h b/src/smt/old_interval.h index a666908e4..8919d9ca0 100644 --- a/src/smt/old_interval.h +++ b/src/smt/old_interval.h @@ -27,14 +27,12 @@ public: enum kind { MINUS_INFINITY, FINITE, PLUS_INFINITY }; private: kind m_kind; - rational m_value; - explicit ext_numeral(kind k):m_kind(k) {} + rational m_value; public: ext_numeral():m_kind(FINITE) {} /* zero */ explicit ext_numeral(bool plus_infinity):m_kind(plus_infinity ? PLUS_INFINITY : MINUS_INFINITY) {} explicit ext_numeral(rational const & val):m_kind(FINITE), m_value(val) {} explicit ext_numeral(int i):m_kind(FINITE), m_value(i) {} - ext_numeral(ext_numeral const & other):m_kind(other.m_kind), m_value(other.m_value) {} bool is_infinite() const { return m_kind != FINITE; } bool sign() const { return m_kind == MINUS_INFINITY || (m_kind == FINITE && m_value.is_neg()); } void neg(); @@ -78,13 +76,12 @@ class old_interval { v_dependency * join_opt(v_dependency * d1, v_dependency * d2, v_dependency * opt1, v_dependency * opt2); public: - explicit old_interval(v_dependency_manager & m); + explicit old_interval(v_dependency_manager & m); explicit old_interval(v_dependency_manager & m, rational const & lower, bool l_open, v_dependency * l_dep, rational const & upper, bool u_open, v_dependency * u_dep); explicit old_interval(v_dependency_manager & m, rational const & val, v_dependency * l_dep = nullptr, v_dependency * u_dep = nullptr); explicit old_interval(v_dependency_manager & m, rational const & val, bool open, bool lower, v_dependency * d); explicit old_interval(v_dependency_manager & m, ext_numeral const& lower, bool l_open, v_dependency * l_dep, ext_numeral const & upper, bool u_open, v_dependency * u_dep); - old_interval(old_interval const & other); - + bool minus_infinity() const { return m_lower.is_infinite(); } bool plus_infinity() const { return m_upper.is_infinite(); } bool is_lower_open() const { return m_lower_open; } diff --git a/src/util/buffer.h b/src/util/buffer.h index aec826a55..57150a124 100644 --- a/src/util/buffer.h +++ b/src/util/buffer.h @@ -43,6 +43,9 @@ protected: T * new_buffer = reinterpret_cast(memory::allocate(sizeof(T) * new_capacity)); for (unsigned i = 0; i < m_pos; ++i) { new (&new_buffer[i]) T(std::move(m_buffer[i])); + if (CallDestructors) { + m_buffer[i].~T(); + } } free_memory(); m_buffer = new_buffer;