Skip to content

Commit

Permalink
remove a few default constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoplopes committed Sep 23, 2024
1 parent 22d9bfa commit a62fede
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 21 deletions.
2 changes: 0 additions & 2 deletions src/ast/recfun_decl_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/ast/seq_decl_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ class seq_util {
/*
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.
Expand Down
2 changes: 1 addition & 1 deletion src/ast/sls/sls_valuation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/math/grobner/grobner.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class grobner {
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(); }
Expand All @@ -63,7 +63,7 @@ class grobner {
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]; }
Expand Down
2 changes: 1 addition & 1 deletion src/math/lp/explanation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/math/lp/general_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class general_matrix {
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),
Expand Down
3 changes: 1 addition & 2 deletions src/math/lp/hnf_cutter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/math/lp/implied_bound.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/math/lp/indexed_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class indexed_vector {

}

indexed_vector() {}
indexed_vector() = default;

void resize(unsigned data_size);
unsigned data_size() const {
Expand Down
2 changes: 1 addition & 1 deletion src/math/lp/lar_term.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class lar_term {
}
}
// 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);
Expand Down
2 changes: 1 addition & 1 deletion src/math/lp/nla_tangent_lemmas.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/muz/base/dl_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down
2 changes: 1 addition & 1 deletion src/muz/spacer/spacer_unsat_core_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
2 changes: 1 addition & 1 deletion src/smt/fingerprints.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
1 change: 0 additions & 1 deletion src/tactic/aig/aig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ struct aig {
unsigned m_ref_count;
aig_lit m_children[2];
unsigned m_mark:1;
aig() {}
};

#if Z3DEBUG
Expand Down
6 changes: 3 additions & 3 deletions src/util/mpq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a62fede

Please sign in to comment.