3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00

remove default destructors & some default constructors

Another ~700 KB reduction in binary size
This commit is contained in:
Nuno Lopes 2024-09-04 22:30:23 +01:00
parent 0837e3b8e8
commit 8061765574
66 changed files with 22 additions and 131 deletions

View file

@ -79,8 +79,6 @@ class nla2bv_tactic : public tactic {
m_default_bv_size = m_num_bits = p.get_uint("nla2bv_bv_size", 4);
}
~imp() {}
void updt_params(params_ref const& p) {}
void operator()(goal & g, model_converter_ref & mc) {

View file

@ -41,8 +41,6 @@ struct bv_bound_chk_rewriter_cfg : public default_rewriter_cfg {
bv_bound_chk_rewriter_cfg(ast_manager & m, bv_bound_chk_stats& stats)
: m_m(m), m_b_rw(m), m_stats(stats) {}
~bv_bound_chk_rewriter_cfg() {}
void updt_params(params_ref const & _p) {
rewriter_params p(_p);
m_bv_ineq_consistency_test_max = p.bv_ineq_consistency_test_max();
@ -146,8 +144,6 @@ public:
imp(ast_manager & m, params_ref const & p, bv_bound_chk_stats& stats)
: m_rw(m, p, stats) { }
virtual ~imp() = default;
ast_manager& m() { return m_rw.m(); }
void operator()(goal_ref const & g) {
@ -164,7 +160,7 @@ public:
m_rw.m_cfg.cleanup();
}
virtual void updt_params(params_ref const & p) {
void updt_params(params_ref const & p) {
m_rw.updt_params(p);
}

View file

@ -48,8 +48,6 @@ namespace {
r.insert("propagate-eq", CPK_BOOL, "propagate equalities from inequalities", "false");
}
~bv_bounds_simplifier() override {}
bool assert_expr(expr * t, bool sign) override {
return assert_expr_core(t, sign);
}

View file

@ -144,9 +144,8 @@ struct ctx_simplify_tactic::imp {
};
struct cache_cell {
expr * m_from;
cached_result * m_result;
cache_cell():m_from(nullptr), m_result(nullptr) {}
expr * m_from = nullptr;
cached_result * m_result = nullptr;
};
ast_manager & m;

View file

@ -117,8 +117,6 @@ public:
m_replace = mk_default_expr_replacer(m, false);
}
~imp() {}
void operator()(goal & g) {
if (g.inconsistent())
return;
@ -202,10 +200,10 @@ private:
// a |-> c1, b |-> c2 <c1,c2> |-> c
//
struct u_pair {
unsigned m_first;
unsigned m_second;
unsigned m_first = 0;
unsigned m_second = 0;
u_pair(unsigned f, unsigned s) : m_first(f), m_second(s) {}
u_pair(): m_first(0), m_second(0) {}
u_pair() = default;
struct hash {
unsigned operator()(u_pair const& p) const {
@ -324,8 +322,6 @@ private:
class parents {
app_parents m_use_funs;
public:
parents() {}
app_parents const& get_parents() { return m_use_funs; }
void operator()(app* n) {

View file

@ -40,10 +40,9 @@ public:
};
private:
unsigned m_ref_count;
unsigned m_ref_count = 0;
public:
probe():m_ref_count(0) {}
virtual ~probe() = default;
void inc_ref() { ++m_ref_count; }

View file

@ -146,8 +146,6 @@ tactic * mk_trace_tactic(char const * tag) {
class fail_if_undecided_tactic : public skip_tactic {
public:
fail_if_undecided_tactic() {}
void operator()(goal_ref const & in, goal_ref_buffer& result) override {
if (!in->is_decided())
throw tactic_exception("undecided");

View file

@ -32,10 +32,8 @@ class progress_callback;
typedef ptr_buffer<goal> goal_buffer;
class tactic : public user_propagator::core {
unsigned m_ref_count;
unsigned m_ref_count = 0;
public:
tactic():m_ref_count(0) {}
void inc_ref() { m_ref_count++; }
void dec_ref() { SASSERT(m_ref_count > 0); m_ref_count--; if (m_ref_count == 0) dealloc(this); }