mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
delete more default constructors
reduces code size by 0.1%
This commit is contained in:
parent
4b4a28239f
commit
737c2208fa
41 changed files with 35 additions and 91 deletions
|
@ -26,7 +26,7 @@ namespace bv {
|
|||
bool tight = true;
|
||||
|
||||
interval_tpl(T const& l, T const& h, unsigned sz, bool tight = false): l(l), h(h), sz(sz), tight(tight) {}
|
||||
interval_tpl() {}
|
||||
interval_tpl() = default;
|
||||
|
||||
bool invariant() const {
|
||||
return
|
||||
|
@ -167,7 +167,7 @@ namespace bv {
|
|||
iinterval i;
|
||||
rinterval r;
|
||||
|
||||
interval() {}
|
||||
interval() = default;
|
||||
|
||||
interval(rational const& l, rational const& h, unsigned sz, bool tight = false) {
|
||||
if (sz <= 64) {
|
||||
|
|
|
@ -24,7 +24,7 @@ class factor {
|
|||
factor_type m_type = factor_type::VAR;
|
||||
bool m_sign = false;
|
||||
public:
|
||||
factor() { }
|
||||
factor() = default;
|
||||
explicit factor(lpvar v, factor_type t) : m_var(v), m_type(t) {}
|
||||
unsigned var() const { return m_var; }
|
||||
factor_type type() const { return m_type; }
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
// m_other is the offset of the corresponding element in its vector : for a row element it points to the column element offset,
|
||||
// for a column element it points to the row element offset
|
||||
unsigned m_other;
|
||||
indexed_value() {}
|
||||
indexed_value() = default;
|
||||
|
||||
indexed_value(T v, unsigned i, unsigned other) :
|
||||
m_value(v), m_index(i), m_other(other) {
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
virtual const rational& coeff() const { return rational::one(); }
|
||||
|
||||
#ifdef Z3DEBUG
|
||||
virtual void sort() {};
|
||||
virtual void sort() {}
|
||||
#endif
|
||||
bool virtual is_linear() const = 0;
|
||||
};
|
||||
|
|
|
@ -116,10 +116,7 @@ template <typename T>
|
|||
struct numeric_pair {
|
||||
T x;
|
||||
T y;
|
||||
// empty constructor
|
||||
numeric_pair() {}
|
||||
// another constructor
|
||||
|
||||
numeric_pair() = default;
|
||||
numeric_pair(T xp, T yp) : x(xp), y(yp) {}
|
||||
|
||||
template <typename X>
|
||||
|
|
|
@ -52,7 +52,7 @@ class permutation_matrix
|
|||
};
|
||||
|
||||
public:
|
||||
permutation_matrix() {}
|
||||
permutation_matrix() = default;
|
||||
permutation_matrix(unsigned length);
|
||||
|
||||
permutation_matrix(unsigned length, vector<unsigned> const & values);
|
||||
|
|
|
@ -98,9 +98,6 @@ private:
|
|||
}
|
||||
}
|
||||
public:
|
||||
|
||||
stacked_vector() { }
|
||||
|
||||
ref operator[] (unsigned a) {
|
||||
return ref(*this, a);
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
void init_row_columns(unsigned m, unsigned n);
|
||||
|
||||
// constructor with no parameters
|
||||
static_matrix() {}
|
||||
static_matrix() = default;
|
||||
|
||||
// constructor
|
||||
static_matrix(unsigned m, unsigned n): m_vector_of_row_offsets(n, -1) {
|
||||
|
|
|
@ -81,7 +81,7 @@ class var_eqs {
|
|||
|
||||
mutable stats m_stats;
|
||||
public:
|
||||
var_eqs(): m_merge_handler(nullptr), m_uf(*this), m_stack() {}
|
||||
var_eqs(): m_merge_handler(nullptr), m_uf(*this) {}
|
||||
/**
|
||||
\brief push a scope */
|
||||
void push() {
|
||||
|
|
|
@ -27,7 +27,7 @@ class ext_var_info {
|
|||
bool m_is_integer;
|
||||
std::string m_name;
|
||||
public:
|
||||
ext_var_info() {}
|
||||
ext_var_info() = default;
|
||||
ext_var_info(unsigned j): ext_var_info(j, true) {}
|
||||
ext_var_info(unsigned j , bool is_int) : m_external_j(j), m_is_integer(is_int) {}
|
||||
ext_var_info(unsigned j , bool is_int, std::string name) : m_external_j(j), m_is_integer(is_int), m_name(name) {}
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace polynomial {
|
|||
*/
|
||||
class power : public std::pair<var, unsigned> {
|
||||
public:
|
||||
power():std::pair<var, unsigned>() {}
|
||||
power() = default;
|
||||
power(var v, unsigned d):std::pair<var, unsigned>(v, d) {}
|
||||
var get_var() const { return first; }
|
||||
unsigned degree() const { return second; }
|
||||
|
@ -1895,7 +1895,7 @@ namespace polynomial {
|
|||
Invoke add(...), addmul(...) several times, and then invoke mk() to obtain the final polynomial.
|
||||
*/
|
||||
class som_buffer {
|
||||
imp * m_owner;
|
||||
imp * m_owner = nullptr;
|
||||
monomial2pos m_m2pos;
|
||||
numeral_vector m_tmp_as;
|
||||
monomial_vector m_tmp_ms;
|
||||
|
@ -1939,8 +1939,6 @@ namespace polynomial {
|
|||
}
|
||||
|
||||
public:
|
||||
som_buffer():m_owner(nullptr) {}
|
||||
|
||||
void reset() {
|
||||
if (empty())
|
||||
return;
|
||||
|
@ -2236,12 +2234,10 @@ namespace polynomial {
|
|||
In this buffer, each monomial can be added at most once.
|
||||
*/
|
||||
class cheap_som_buffer {
|
||||
imp * m_owner;
|
||||
imp * m_owner = nullptr;
|
||||
numeral_vector m_tmp_as;
|
||||
monomial_vector m_tmp_ms;
|
||||
public:
|
||||
cheap_som_buffer():m_owner(nullptr) {}
|
||||
|
||||
void set_owner(imp * o) { m_owner = o; }
|
||||
bool empty() const { return m_tmp_ms.empty(); }
|
||||
|
||||
|
@ -3072,11 +3068,9 @@ namespace polynomial {
|
|||
}
|
||||
|
||||
class newton_interpolator_vector {
|
||||
imp * m_imp;
|
||||
imp * m_imp = nullptr;
|
||||
ptr_vector<newton_interpolator> m_data;
|
||||
public:
|
||||
newton_interpolator_vector():m_imp(nullptr) {}
|
||||
|
||||
~newton_interpolator_vector() {
|
||||
flush();
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace upolynomial {
|
|||
|
||||
public:
|
||||
|
||||
factorization_degree_set() { }
|
||||
factorization_degree_set() = default;
|
||||
|
||||
factorization_degree_set(zp_factors const & factors)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace opt {
|
|||
struct var {
|
||||
unsigned m_id { 0 };
|
||||
rational m_coeff;
|
||||
var() {}
|
||||
var() = default;
|
||||
var(unsigned id, rational const& c): m_id(id), m_coeff(c) {}
|
||||
struct compare {
|
||||
bool operator()(var x, var y) {
|
||||
|
@ -76,11 +76,11 @@ namespace opt {
|
|||
|
||||
// A definition is a linear term of the form (vars + coeff) / div
|
||||
struct def {
|
||||
def(): m_div(1) {}
|
||||
def() = default;
|
||||
def(row const& r, unsigned x);
|
||||
vector<var> m_vars;
|
||||
rational m_coeff;
|
||||
rational m_div;
|
||||
rational m_div{1};
|
||||
def operator+(def const& other) const;
|
||||
def operator/(unsigned n) const { return *this / rational(n); }
|
||||
def operator/(rational const& n) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue