3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 01:24:08 +00:00

remove a few default constructors

This commit is contained in:
Nuno Lopes 2024-09-23 08:17:58 +01:00
parent 22d9bfad35
commit a62fede64b
16 changed files with 16 additions and 21 deletions

View file

@ -170,8 +170,6 @@ namespace recfun {
vector<branch> m_branches;
public:
case_state() : m_reg(), m_branches() {}
bool empty() const { return m_branches.empty(); }
branch pop_branch() {

View file

@ -446,7 +446,7 @@ public:
/*
Default constructor of invalid info.
*/
info() {}
info() = default;
/*
Used for constructing either an invalid info that is only used to indicate uninitialized entry, or valid but unknown info value.

View file

@ -33,7 +33,7 @@ namespace bv {
unsigned nw = 0;
unsigned mask = 0;
bvect() {}
bvect() = default;
bvect(unsigned sz) : svector(sz, (unsigned)0) {}
void set_bw(unsigned bw);

View file

@ -48,7 +48,7 @@ public:
friend class grobner;
friend struct monomial_lt;
monomial() {}
monomial() = default;
public:
rational const & get_coeff() const { return m_coeff; }
unsigned get_degree() const { return m_vars.size(); }
@ -63,7 +63,7 @@ public:
ptr_vector<monomial> m_monomials; //!< sorted monomials
v_dependency * m_dep; //!< justification for the equality
friend class grobner;
equation() {}
equation() = default;
public:
unsigned get_num_monomials() const { return m_monomials.size(); }
monomial const * get_monomial(unsigned idx) const { return m_monomials[idx]; }

View file

@ -29,7 +29,7 @@ class explanation {
vector<std::pair<constraint_index, mpq>> m_vector;
ci_set m_set;
public:
explanation() {}
explanation() = default;
template <typename T>
explanation(const T& t) {

View file

@ -180,7 +180,7 @@ public:
m_column_permutation.transpose_from_left(j, k);
}
general_matrix(){}
general_matrix() = default;
general_matrix(unsigned n) :
m_row_permutation(n),
m_column_permutation(n),

View file

@ -19,8 +19,7 @@ namespace lp {
lia(lia),
lra(lia.lra),
m_settings(lia.settings()),
m_abs_max(zero_of_type<mpq>()),
m_var_register() {}
m_abs_max(zero_of_type<mpq>()) {}
bool hnf_cutter::is_full() const {
return

View file

@ -44,7 +44,7 @@ class implied_bound {
k = static_cast<lconstraint_kind>(k / 2);
return k;
}
implied_bound(){}
implied_bound() = default;
implied_bound(const mpq & a,
unsigned j,
bool is_lower_bound,

View file

@ -76,7 +76,7 @@ public:
}
indexed_vector() {}
indexed_vector() = default;
void resize(unsigned data_size);
unsigned data_size() const {

View file

@ -70,7 +70,7 @@ public:
}
}
// constructors
lar_term() {}
lar_term() = default;
lar_term(const vector<std::pair<mpq, unsigned>>& coeffs) {
for (auto const& p : coeffs) {
add_monomial(p.first, p.second);

View file

@ -17,7 +17,7 @@ struct point {
rational x;
rational y;
point(const rational& a, const rational& b): x(a), y(b) {}
point() {}
point() = default;
inline point& operator*=(rational a) {
x *= a;
y *= a;

View file

@ -347,7 +347,6 @@ namespace datalog {
class rule_counter : public var_counter {
public:
rule_counter(){}
void count_rule_vars(const rule * r, int coef = 1);
unsigned get_max_rule_var(const rule& r);
};

View file

@ -33,7 +33,7 @@ namespace spacer {
unsat_core_plugin(unsat_core_learner& learner);
virtual ~unsat_core_plugin() = default;
virtual void compute_partial_core(proof* step) = 0;
virtual void finalize(){};
virtual void finalize(){}
unsat_core_learner& m_ctx;
};

View file

@ -32,7 +32,7 @@ namespace smt {
enode** m_args = nullptr;
friend class fingerprint_set;
fingerprint() {}
fingerprint() = default;
public:
fingerprint(region & r, void * d, unsigned d_hash, expr* def, unsigned n, enode * const * args);
void * get_data() const { return m_data; }

View file

@ -50,7 +50,6 @@ struct aig {
unsigned m_ref_count;
aig_lit m_children[2];
unsigned m_mark:1;
aig() {}
};
#if Z3DEBUG

View file

@ -23,12 +23,12 @@ Revision History:
class mpq {
mpz m_num;
mpz m_den;
mpz m_den = 1;
friend class mpq_manager<true>;
friend class mpq_manager<false>;
public:
mpq(int v):m_num(v), m_den(1) {}
mpq():m_den(1) {}
mpq(int v) : m_num(v) {}
mpq() = default;
mpq(mpq &&) noexcept = default;
mpq & operator=(mpq&&) = default;
mpq & operator=(mpq const&) = delete;