Skip to content

Commit a62fede

Browse files
committed
remove a few default constructors
1 parent 22d9bfa commit a62fede

16 files changed

+16
-21
lines changed

src/ast/recfun_decl_plugin.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ namespace recfun {
170170
vector<branch> m_branches;
171171

172172
public:
173-
case_state() : m_reg(), m_branches() {}
174-
175173
bool empty() const { return m_branches.empty(); }
176174

177175
branch pop_branch() {

src/ast/seq_decl_plugin.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ class seq_util {
446446
/*
447447
Default constructor of invalid info.
448448
*/
449-
info() {}
449+
info() = default;
450450

451451
/*
452452
Used for constructing either an invalid info that is only used to indicate uninitialized entry, or valid but unknown info value.

src/ast/sls/sls_valuation.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace bv {
3333
unsigned nw = 0;
3434
unsigned mask = 0;
3535

36-
bvect() {}
36+
bvect() = default;
3737
bvect(unsigned sz) : svector(sz, (unsigned)0) {}
3838
void set_bw(unsigned bw);
3939

src/math/grobner/grobner.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class grobner {
4848
friend class grobner;
4949
friend struct monomial_lt;
5050

51-
monomial() {}
51+
monomial() = default;
5252
public:
5353
rational const & get_coeff() const { return m_coeff; }
5454
unsigned get_degree() const { return m_vars.size(); }
@@ -63,7 +63,7 @@ class grobner {
6363
ptr_vector<monomial> m_monomials; //!< sorted monomials
6464
v_dependency * m_dep; //!< justification for the equality
6565
friend class grobner;
66-
equation() {}
66+
equation() = default;
6767
public:
6868
unsigned get_num_monomials() const { return m_monomials.size(); }
6969
monomial const * get_monomial(unsigned idx) const { return m_monomials[idx]; }

src/math/lp/explanation.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class explanation {
2929
vector<std::pair<constraint_index, mpq>> m_vector;
3030
ci_set m_set;
3131
public:
32-
explanation() {}
32+
explanation() = default;
3333

3434
template <typename T>
3535
explanation(const T& t) {

src/math/lp/general_matrix.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class general_matrix {
180180
m_column_permutation.transpose_from_left(j, k);
181181
}
182182

183-
general_matrix(){}
183+
general_matrix() = default;
184184
general_matrix(unsigned n) :
185185
m_row_permutation(n),
186186
m_column_permutation(n),

src/math/lp/hnf_cutter.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ namespace lp {
1919
lia(lia),
2020
lra(lia.lra),
2121
m_settings(lia.settings()),
22-
m_abs_max(zero_of_type<mpq>()),
23-
m_var_register() {}
22+
m_abs_max(zero_of_type<mpq>()) {}
2423

2524
bool hnf_cutter::is_full() const {
2625
return

src/math/lp/implied_bound.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class implied_bound {
4444
k = static_cast<lconstraint_kind>(k / 2);
4545
return k;
4646
}
47-
implied_bound(){}
47+
implied_bound() = default;
4848
implied_bound(const mpq & a,
4949
unsigned j,
5050
bool is_lower_bound,

src/math/lp/indexed_vector.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class indexed_vector {
7676

7777
}
7878

79-
indexed_vector() {}
79+
indexed_vector() = default;
8080

8181
void resize(unsigned data_size);
8282
unsigned data_size() const {

src/math/lp/lar_term.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class lar_term {
7070
}
7171
}
7272
// constructors
73-
lar_term() {}
73+
lar_term() = default;
7474
lar_term(const vector<std::pair<mpq, unsigned>>& coeffs) {
7575
for (auto const& p : coeffs) {
7676
add_monomial(p.first, p.second);

src/math/lp/nla_tangent_lemmas.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct point {
1717
rational x;
1818
rational y;
1919
point(const rational& a, const rational& b): x(a), y(b) {}
20-
point() {}
20+
point() = default;
2121
inline point& operator*=(rational a) {
2222
x *= a;
2323
y *= a;

src/muz/base/dl_util.h

-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ namespace datalog {
347347

348348
class rule_counter : public var_counter {
349349
public:
350-
rule_counter(){}
351350
void count_rule_vars(const rule * r, int coef = 1);
352351
unsigned get_max_rule_var(const rule& r);
353352
};

src/muz/spacer/spacer_unsat_core_plugin.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace spacer {
3333
unsat_core_plugin(unsat_core_learner& learner);
3434
virtual ~unsat_core_plugin() = default;
3535
virtual void compute_partial_core(proof* step) = 0;
36-
virtual void finalize(){};
36+
virtual void finalize(){}
3737

3838
unsat_core_learner& m_ctx;
3939
};

src/smt/fingerprints.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace smt {
3232
enode** m_args = nullptr;
3333

3434
friend class fingerprint_set;
35-
fingerprint() {}
35+
fingerprint() = default;
3636
public:
3737
fingerprint(region & r, void * d, unsigned d_hash, expr* def, unsigned n, enode * const * args);
3838
void * get_data() const { return m_data; }

src/tactic/aig/aig.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ struct aig {
5050
unsigned m_ref_count;
5151
aig_lit m_children[2];
5252
unsigned m_mark:1;
53-
aig() {}
5453
};
5554

5655
#if Z3DEBUG

src/util/mpq.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Revision History:
2323

2424
class mpq {
2525
mpz m_num;
26-
mpz m_den;
26+
mpz m_den = 1;
2727
friend class mpq_manager<true>;
2828
friend class mpq_manager<false>;
2929
public:
30-
mpq(int v):m_num(v), m_den(1) {}
31-
mpq():m_den(1) {}
30+
mpq(int v) : m_num(v) {}
31+
mpq() = default;
3232
mpq(mpq &&) noexcept = default;
3333
mpq & operator=(mpq&&) = default;
3434
mpq & operator=(mpq const&) = delete;

0 commit comments

Comments
 (0)