Skip to content

Commit 3586b61

Browse files
committed
remove default destructors
1 parent b170f10 commit 3586b61

File tree

95 files changed

+25
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+25
-259
lines changed

src/ast/arith_decl_plugin.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ struct arith_decl_plugin::algebraic_numbers_wrapper {
3434
m_nums(m_amanager) {
3535
}
3636

37-
~algebraic_numbers_wrapper() {
38-
}
39-
4037
unsigned mk_id(algebraic_numbers::anum const & val) {
4138
SASSERT(!m_amanager.is_rational(val));
4239
unsigned idx = m_id_gen.mk();

src/ast/ast_trail.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ class ast2ast_trailmap {
3333
public:
3434
ast2ast_trailmap(ast_manager& m):
3535
m_domain(m),
36-
m_range(m),
37-
m_map()
36+
m_range(m)
3837
{}
3938

4039
bool find(S* s, T*& t) {

src/ast/datatype_decl_plugin.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -1040,11 +1040,6 @@ namespace datatype {
10401040
return m_family_id;
10411041
}
10421042

1043-
1044-
util::~util() {
1045-
1046-
}
1047-
10481043
ptr_vector<func_decl> const * util::get_datatype_constructors(sort * ty) {
10491044
SASSERT(is_datatype(ty));
10501045
ptr_vector<func_decl> * r = nullptr;

src/ast/datatype_decl_plugin.h

-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ namespace datatype {
338338

339339
public:
340340
util(ast_manager & m);
341-
~util();
342341
ast_manager & get_manager() const { return m; }
343342
// sort * mk_datatype_sort(symbol const& name, unsigned n, sort* const* params);
344343
bool is_datatype(sort const* s) const { return is_sort_of(s, fid(), DATATYPE_SORT); }

src/ast/expr2polynomial.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,6 @@ default_expr2polynomial::default_expr2polynomial(ast_manager & am, polynomial::m
504504
expr2polynomial(am, pm, nullptr) {
505505
}
506506

507-
default_expr2polynomial::~default_expr2polynomial() {
508-
}
509-
510507
bool default_expr2polynomial::is_int(polynomial::var x) const {
511508
return m_is_int[x];
512509
}

src/ast/expr2polynomial.h

-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ class default_expr2polynomial : public expr2polynomial {
102102
bool_vector m_is_int;
103103
public:
104104
default_expr2polynomial(ast_manager & am, polynomial::manager & pm);
105-
~default_expr2polynomial() override;
106105
bool is_int(polynomial::var x) const override;
107106
protected:
108107
polynomial::var mk_var(bool is_int) override;

src/ast/fpa/fpa2bv_rewriter.h

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ struct fpa2bv_rewriter_cfg : public default_rewriter_cfg {
3636

3737
fpa2bv_rewriter_cfg(ast_manager & m, fpa2bv_converter & c, params_ref const & p);
3838

39-
~fpa2bv_rewriter_cfg() {
40-
}
41-
4239
void cleanup_buffers() {
4340
m_out.finalize();
4441
}

src/ast/fpa_decl_plugin.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ void fpa_decl_plugin::set_manager(ast_manager * m, family_id id) {
4747
m_bv_plugin = static_cast<bv_decl_plugin*>(m_manager->get_plugin(m_bv_fid));
4848
}
4949

50-
fpa_decl_plugin::~fpa_decl_plugin() {
51-
}
52-
5350
unsigned fpa_decl_plugin::mk_id(mpf const & v) {
5451
unsigned new_id = m_id_gen.mk();
5552
m_values.reserve(new_id+1);
@@ -961,9 +958,6 @@ fpa_util::fpa_util(ast_manager & m):
961958
m_plugin = static_cast<fpa_decl_plugin*>(m.get_plugin(m_fid));
962959
}
963960

964-
fpa_util::~fpa_util() {
965-
}
966-
967961
sort * fpa_util::mk_float_sort(unsigned ebits, unsigned sbits) {
968962
parameter ps[2] = { parameter(ebits), parameter(sbits) };
969963
return m().mk_sort(m_fid, FLOATING_POINT_SORT, 2, ps);

src/ast/fpa_decl_plugin.h

-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ class fpa_decl_plugin : public decl_plugin {
175175
bool is_float_sort(sort * s) const { return is_sort_of(s, m_family_id, FLOATING_POINT_SORT); }
176176
bool is_rm_sort(sort * s) const { return is_sort_of(s, m_family_id, ROUNDING_MODE_SORT); }
177177

178-
~fpa_decl_plugin() override;
179178
void finalize() override;
180179

181180
decl_plugin * mk_fresh() override;
@@ -216,7 +215,6 @@ class fpa_util {
216215

217216
public:
218217
fpa_util(ast_manager & m);
219-
~fpa_util();
220218

221219
ast_manager & m() const { return m_manager; }
222220
mpf_manager & fm() const { return m_plugin->fm(); }

src/ast/macros/cond_macro.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ class cond_macro {
3939
m_weight(weight) {
4040
SASSERT(!m_hint || !m_cond);
4141
}
42-
43-
~cond_macro() {
44-
}
45-
42+
4643
func_decl * get_f() const { return m_f; }
4744

4845
expr * get_def() const { return m_def; }

src/ast/macros/macro_finder.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,6 @@ macro_finder::macro_finder(ast_manager & m, macro_manager & mm):
269269
m_autil(m) {
270270
}
271271

272-
macro_finder::~macro_finder() {
273-
}
274-
275272
bool macro_finder::expand_macros(expr_ref_vector const& exprs, proof_ref_vector const& prs, expr_dependency_ref_vector const& deps, expr_ref_vector & new_exprs, proof_ref_vector & new_prs, expr_dependency_ref_vector & new_deps) {
276273
TRACE("macro_finder", tout << "starting expand_macros:\n";
277274
m_macro_manager.display(tout););

src/ast/macros/macro_finder.h

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class macro_finder {
4343

4444
public:
4545
macro_finder(ast_manager & m, macro_manager & mm);
46-
~macro_finder();
4746
void operator()(expr_ref_vector const& exprs, proof_ref_vector const& prs, expr_dependency_ref_vector const& deps, expr_ref_vector & new_exprs, proof_ref_vector & new_prs, expr_dependency_ref_vector & new_deps);
4847
void operator()(unsigned n, justified_expr const* fmls, vector<justified_expr>& new_fmls);
4948
};

src/ast/macros/macro_manager.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ macro_manager::macro_manager(ast_manager & m):
4141
m_util.set_forbidden_set(&m_forbidden_set);
4242
}
4343

44-
macro_manager::~macro_manager() {
45-
}
46-
4744
void macro_manager::push_scope() {
4845
m_scopes.push_back(scope());
4946
scope & s = m_scopes.back();

src/ast/macros/macro_manager.h

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ class macro_manager {
6464

6565
public:
6666
macro_manager(ast_manager & m);
67-
~macro_manager();
6867
void copy_to(macro_manager& dst);
6968
ast_manager & get_manager() const { return m; }
7069
macro_util & get_util() { return m_util; }

src/ast/macros/quasi_macros.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ quasi_macros::quasi_macros(ast_manager & m, macro_manager & mm) :
3131
m_new_qsorts(m) {
3232
}
3333

34-
quasi_macros::~quasi_macros() {
35-
}
36-
3734
void quasi_macros::find_occurrences(expr * e) {
3835
unsigned j;
3936
m_todo.reset();

src/ast/macros/quasi_macros.h

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ class quasi_macros {
6060

6161
public:
6262
quasi_macros(ast_manager & m, macro_manager & mm);
63-
~quasi_macros();
6463

6564
/**
6665
\brief Find pure function macros and apply them.

src/ast/normal_forms/defined_names.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct defined_names::impl {
5757
unsigned_vector m_lims; //!< Backtracking support.
5858

5959
impl(ast_manager & m, char const * prefix);
60-
virtual ~impl();
60+
virtual ~impl() = default;
6161

6262
app * gen_name(expr * e, sort_ref_buffer & var_sorts, buffer<symbol> & var_names);
6363
void cache_new_name(expr * e, app * name);
@@ -90,9 +90,6 @@ defined_names::impl::impl(ast_manager & m, char const * prefix):
9090
m_z3name = prefix;
9191
}
9292

93-
defined_names::impl::~impl() {
94-
}
95-
9693
/**
9794
\brief Given an expression \c e that may contain free variables, return an application (sk x_1 ... x_n),
9895
where sk is a fresh variable name, and x_i's are the free variables of \c e.

src/ast/pattern/expr_pattern_match.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ expr_pattern_match::expr_pattern_match(ast_manager & manager):
4141
m_manager(manager), m_precompiled(manager) {
4242
}
4343

44-
expr_pattern_match::~expr_pattern_match() {
45-
}
46-
4744
bool
4845
expr_pattern_match::match_quantifier(quantifier* qf, app_ref_vector& patterns, unsigned& weight) {
4946
if (m_regs.empty()) {

src/ast/pattern/expr_pattern_match.h

-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ class expr_pattern_match {
116116

117117
public:
118118
expr_pattern_match(ast_manager & manager);
119-
~expr_pattern_match();
120119
bool match_quantifier(quantifier * qf, app_ref_vector & patterns, unsigned & weight);
121120
bool match_quantifier_index(quantifier* qf, app_ref_vector & patterns, unsigned& index);
122121
unsigned initialize(quantifier* qf);

src/ast/recfun_decl_plugin.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,6 @@ namespace recfun {
366366
m_plugin(dynamic_cast<decl::plugin*>(m.get_plugin(m_fid))) {
367367
}
368368

369-
util::~util() {
370-
}
371-
372369
def * util::decl_fun(symbol const& name, unsigned n, sort *const * domain, sort * range, bool is_generated) {
373370
return alloc(def, m(), m_fid, name, n, domain, range, is_generated);
374371
}

src/ast/recfun_decl_plugin.h

-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ namespace recfun {
237237

238238
public:
239239
util(ast_manager &m);
240-
~util();
241240

242241
ast_manager & m() { return m_manager; }
243242
family_id get_family_id() const { return m_fid; }

src/ast/sls/bvsls_opt_engine.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ bvsls_opt_engine::bvsls_opt_engine(ast_manager & m, params_ref const & p) :
2828
m_best_model = alloc(model, m);
2929
}
3030

31-
bvsls_opt_engine::~bvsls_opt_engine()
32-
{
33-
}
34-
3531
bvsls_opt_engine::optimization_result bvsls_opt_engine::optimize(
3632
expr_ref const & objective,
3733
model_ref initial_model,

src/ast/sls/bvsls_opt_engine.h

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class bvsls_opt_engine : public sls_engine {
3131

3232
public:
3333
bvsls_opt_engine(ast_manager & m, params_ref const & p);
34-
~bvsls_opt_engine();
3534

3635
class optimization_result {
3736
public:

src/cmd_context/cmd_context.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -2464,9 +2464,6 @@ cmd_context::dt_eh::dt_eh(cmd_context & owner):
24642464
m_dt_util(owner.m()) {
24652465
}
24662466

2467-
cmd_context::dt_eh::~dt_eh() {
2468-
}
2469-
24702467
void cmd_context::dt_eh::operator()(sort * dt, pdecl* pd) {
24712468
TRACE("new_dt_eh", tout << "new datatype: "; m_owner.pm().display(tout, dt); tout << "\n";);
24722469
for (func_decl * c : *m_dt_util.get_datatype_constructors(dt)) {

src/cmd_context/cmd_context.h

-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ class cmd_context : public progress_callback, public tactic_manager, public ast_
305305
public:
306306
void reset() { m_dt_util.reset(); }
307307
dt_eh(cmd_context & owner);
308-
~dt_eh() override;
309308
void operator()(sort * dt, pdecl* pd) override;
310309
};
311310

src/cmd_context/tactic_cmds.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Module Name:
2727
#include "ast/ast_smt2_pp.h"
2828
#include "tactic/tactic.h"
2929
#include "tactic/tactical.h"
30-
#include "tactic/probe.h"
3130
#include "solver/check_sat_result.h"
3231
#include "cmd_context/cmd_context_to_goal.h"
3332
#include "cmd_context/echo_tactic.h"
@@ -38,9 +37,6 @@ probe_info::probe_info(symbol const & n, char const * d, probe * p):
3837
m_probe(p) {
3938
}
4039

41-
probe_info::~probe_info() {
42-
}
43-
4440
class declare_tactic_cmd : public cmd {
4541
symbol m_name;
4642
sexpr * m_decl;

src/cmd_context/tactic_cmds.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ Module Name:
1818
#pragma once
1919

2020
#include "ast/ast.h"
21+
#include "tactic/probe.h"
2122
#include "util/params.h"
2223
#include "util/cmd_context_types.h"
2324
#include "util/ref.h"
2425

2526
class tactic;
26-
class probe;
2727

2828
typedef tactic* (*tactic_factory)(ast_manager&, const params_ref&);
2929

@@ -52,7 +52,6 @@ class probe_info {
5252
ref<probe> m_probe;
5353
public:
5454
probe_info(symbol const & n, char const * d, probe * p);
55-
~probe_info();
5655

5756
symbol get_name() const { return m_name; }
5857
char const * get_descr() const { return m_descr; }

src/math/lp/core_solver_pretty_printer.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,5 @@ Revision History:
2121
#include "math/lp/core_solver_pretty_printer_def.h"
2222
template lp::core_solver_pretty_printer<lp::mpq, lp::mpq>::core_solver_pretty_printer(const lp::lp_core_solver_base<lp::mpq, lp::mpq> &, std::ostream & out);
2323
template void lp::core_solver_pretty_printer<lp::mpq, lp::mpq>::print();
24-
template lp::core_solver_pretty_printer<lp::mpq, lp::mpq>::~core_solver_pretty_printer();
2524
template lp::core_solver_pretty_printer<lp::mpq, lp::numeric_pair<lp::mpq> >::core_solver_pretty_printer(const lp::lp_core_solver_base<lp::mpq, lp::numeric_pair<lp::mpq> > &, std::ostream & out);
26-
template lp::core_solver_pretty_printer<lp::mpq, lp::numeric_pair<lp::mpq> >::~core_solver_pretty_printer();
2725
template void lp::core_solver_pretty_printer<lp::mpq, lp::numeric_pair<lp::mpq> >::print();

src/math/lp/core_solver_pretty_printer.h

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ class core_solver_pretty_printer {
6666

6767
void init_costs();
6868

69-
~core_solver_pretty_printer();
7069
void init_rs_width();
7170

7271
T current_column_norm();

src/math/lp/core_solver_pretty_printer_def.h

-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ template <typename T, typename X> void core_solver_pretty_printer<T, X>::init_co
6767

6868
}
6969

70-
template <typename T, typename X> core_solver_pretty_printer<T, X>::~core_solver_pretty_printer() {
71-
}
7270
template <typename T, typename X> void core_solver_pretty_printer<T, X>::init_rs_width() {
7371
m_rs_width = static_cast<unsigned>(T_to_string(m_core_solver.get_cost()).size());
7472
for (unsigned i = 0; i < nrows(); i++) {

src/math/polynomial/algebraic_numbers.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ namespace algebraic_numbers {
121121
m_y = pm().mk_var();
122122
}
123123

124-
~imp() {
125-
}
126-
127124
bool acell_inv(algebraic_cell const& c) {
128125
auto s = upm().eval_sign_at(c.m_p_sz, c.m_p, lower(&c));
129126
return s == sign_zero || c.m_sign_lower == (s == sign_neg);

src/math/realclosure/mpz_matrix.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ mpz_matrix_manager::mpz_matrix_manager(unsynch_mpz_manager & nm, small_object_al
3636
m_allocator(a) {
3737
}
3838

39-
mpz_matrix_manager::~mpz_matrix_manager() {
40-
}
41-
4239
void mpz_matrix_manager::mk(unsigned m, unsigned n, mpz_matrix & A) {
4340
SASSERT(m > 0 && n > 0);
4441
del(A);

src/math/realclosure/mpz_matrix.h

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ class mpz_matrix_manager {
6363
bool solve_core(mpz_matrix const & A, mpz * b, bool int_solver);
6464
public:
6565
mpz_matrix_manager(unsynch_mpz_manager & nm, small_object_allocator & a);
66-
~mpz_matrix_manager();
6766
unsynch_mpz_manager & nm() const { return m_nm; }
6867
void mk(unsigned m, unsigned n, mpz_matrix & A);
6968
void del(mpz_matrix & r);

src/math/realclosure/realclosure.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,6 @@ namespace realclosure {
410410
sbuffer<unsigned> m_szs; // size of each polynomial in the sequence
411411
public:
412412
scoped_polynomial_seq(imp & m):m_seq_coeffs(m) {}
413-
~scoped_polynomial_seq() {
414-
}
415413

416414
/**
417415
\brief Add a new polynomial to the sequence.

src/model/numeral_factory.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ arith_factory::arith_factory(ast_manager & m):
2828
m_util(m) {
2929
}
3030

31-
arith_factory::~arith_factory() {
32-
}
33-
3431
app * arith_factory::mk_num_value(rational const & val, bool is_int) {
3532
return numeral_factory::mk_value(val, is_int ? m_util.mk_int() : m_util.mk_real());
3633
}
@@ -40,9 +37,6 @@ bv_factory::bv_factory(ast_manager & m):
4037
m_util(m) {
4138
}
4239

43-
bv_factory::~bv_factory() {
44-
}
45-
4640
app * bv_factory::mk_value_core(rational const & val, sort * s) {
4741
return m_util.mk_numeral(val, s);
4842
}

src/model/numeral_factory.h

-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class arith_factory : public numeral_factory {
3434

3535
public:
3636
arith_factory(ast_manager & m);
37-
~arith_factory() override;
3837

3938
app * mk_num_value(rational const & val, bool is_int);
4039
};
@@ -46,7 +45,6 @@ class bv_factory : public numeral_factory {
4645

4746
public:
4847
bv_factory(ast_manager & m);
49-
~bv_factory() override;
5048

5149
app * mk_num_value(rational const & val, unsigned bv_size);
5250
};

0 commit comments

Comments
 (0)