3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

Use = default for virtual constructors.

This commit is contained in:
Bruce Mitchener 2022-08-04 13:21:07 +07:00 committed by Nikolaj Bjorner
parent aa0719abae
commit 5014b1a34d
85 changed files with 106 additions and 107 deletions

View file

@ -53,7 +53,7 @@ namespace datalog {
m_limited_size = ctx.get_decl_util().try_get_size(s, m_size);
}
public:
virtual ~sort_domain() {}
virtual ~sort_domain() = default;
sort_kind get_kind() const { return m_kind; }
virtual unsigned get_constant_count() const = 0;

View file

@ -42,7 +42,7 @@ namespace datalog {
std::string m_name;
public:
engine_base(ast_manager& m, char const* name): m(m), m_name(name) {}
virtual ~engine_base() {}
virtual ~engine_base() = default;
virtual expr_ref get_answer() = 0;
virtual expr_ref get_ground_sat_answer () {

View file

@ -89,7 +89,7 @@ namespace datalog {
m_can_destratify_negation(can_destratify_negation), m_transformer(nullptr) {}
public:
virtual ~plugin() {}
virtual ~plugin() = default;
unsigned get_priority() { return m_priority; }
bool can_destratify_negation() const { return m_can_destratify_negation; }

View file

@ -27,7 +27,7 @@ namespace datalog {
public:
static parser * create(context& ctx, ast_manager & ast_manager);
virtual ~parser() {}
virtual ~parser() = default;
virtual bool parse_file(char const * path) = 0;
virtual bool parse_string(char const * string) = 0;
@ -37,7 +37,7 @@ namespace datalog {
public:
static wpa_parser * create(context& ctx, ast_manager & ast_manager);
virtual ~wpa_parser() {}
virtual ~wpa_parser() = default;
virtual bool parse_directory(char const * path) = 0;
};

View file

@ -179,7 +179,7 @@ namespace datalog {
class base_fn {
public:
base_fn() = default;
virtual ~base_fn() {}
virtual ~base_fn() = default;
base_fn(const base_fn &) = delete;
base_fn& operator=(const base_fn &) = delete;
@ -260,7 +260,7 @@ namespace datalog {
*/
bool check_kind(base_object const& r) const { return &r.get_plugin()==this; }
public:
virtual ~plugin_object() {}
virtual ~plugin_object() = default;
virtual void initialize(family_id fid) { m_kind = fid; }
@ -423,7 +423,7 @@ namespace datalog {
}
#endif
virtual ~base_ancestor() {}
virtual ~base_ancestor() = default;
void set_kind(family_id kind) { SASSERT(kind>=0); m_kind = kind; }
@ -865,7 +865,7 @@ namespace datalog {
class table_row_mutator_fn {
public:
virtual ~table_row_mutator_fn() {}
virtual ~table_row_mutator_fn() = default;
/**
\brief The function is called for a particular table row. The \c func_columns contains
a pointer to an array of functional column values that can be modified. If the function
@ -879,7 +879,7 @@ namespace datalog {
class table_row_pair_reduce_fn {
public:
virtual ~table_row_pair_reduce_fn() {}
virtual ~table_row_pair_reduce_fn() = default;
/**
\brief The function is called for pair of table rows that became duplicated due to projection.
The values that are in the first array after return from the function will be used for the
@ -1095,7 +1095,7 @@ namespace datalog {
unsigned m_ref_cnt;
public:
iterator_core() : m_ref_cnt(0) {}
virtual ~iterator_core() {}
virtual ~iterator_core() = default;
iterator_core(const iterator_core &) = delete;
iterator_core & operator=(const iterator_core &) = delete;
@ -1124,7 +1124,7 @@ namespace datalog {
unsigned m_ref_cnt;
public:
row_iterator_core() : m_ref_cnt(0) {}
virtual ~row_iterator_core() {}
virtual ~row_iterator_core() = default;
row_iterator_core(const row_iterator_core &) = delete;
row_iterator_core & operator=(const row_iterator_core &) = delete;
@ -1205,7 +1205,7 @@ namespace datalog {
typedef row_iterator const_iterator;
row_interface(const table_base & parent_table) : m_parent_table(parent_table) {}
virtual ~row_interface() {}
virtual ~row_interface() = default;
virtual table_element operator[](unsigned col) const = 0;

View file

@ -26,7 +26,7 @@ namespace datalog {
class external_relation_context {
public:
virtual ~external_relation_context() {}
virtual ~external_relation_context() = default;
virtual family_id get_family_id() const = 0;

View file

@ -317,7 +317,7 @@ namespace datalog {
class instruction_block {
public:
struct instruction_observer {
virtual ~instruction_observer() {}
virtual ~instruction_observer() = default;
virtual void notify(instruction * i) {}
};
private:

View file

@ -107,7 +107,7 @@ namespace datalog {
public:
lazy_table_ref(lazy_table_plugin& p, table_signature const& sig):
m_plugin(p), m_signature(sig), m_ref(0) {}
virtual ~lazy_table_ref() {}
virtual ~lazy_table_ref() = default;
void inc_ref() { ++m_ref; }
void dec_ref() { --m_ref; if (0 == m_ref) dealloc(this); }
void release_table() { m_table.release(); }

View file

@ -999,7 +999,7 @@ namespace datalog {
class relation_manager::auxiliary_table_transformer_fn {
table_fact m_row;
public:
virtual ~auxiliary_table_transformer_fn() {}
virtual ~auxiliary_table_transformer_fn() = default;
virtual const table_signature & get_result_signature() const = 0;
virtual void modify_fact(table_fact & f) const = 0;
@ -1241,7 +1241,7 @@ namespace datalog {
table_fact m_row;
svector<table_element> m_to_remove;
public:
virtual ~auxiliary_table_filter_fn() {}
virtual ~auxiliary_table_filter_fn() = default;
virtual bool should_remove(const table_fact & f) const = 0;
void operator()(table_base & r) {

View file

@ -274,7 +274,7 @@ namespace datalog {
key_indexer(unsigned key_len, const unsigned * key_cols)
: m_key_cols(key_len, key_cols) {}
virtual ~key_indexer() {}
virtual ~key_indexer() = default;
virtual void update(const sparse_table & t) {}

View file

@ -40,7 +40,7 @@ namespace datalog {
class base_fn {
public:
virtual ~base_fn() {}
virtual ~base_fn() = default;
};
class join_fn : public base_fn {
@ -113,7 +113,7 @@ namespace datalog {
base_ancestor(kind k, relation_manager & m, const signature & s)
: m_kind(k), m_manager(m), m_signature(s) {}
public:
virtual ~base_ancestor() {}
virtual ~base_ancestor() = default;
kind get_kind() const { return m_kind; }
relation_manager & get_manager() const { return m_manager; }

View file

@ -857,7 +857,7 @@ protected:
context& m_ctx;
public:
lemma_generalizer(context& ctx): m_ctx(ctx) {}
virtual ~lemma_generalizer() {}
virtual ~lemma_generalizer() = default;
virtual void operator()(lemma_ref &lemma) = 0;
virtual void collect_statistics(statistics& st) const {}
virtual void reset_statistics() {}

View file

@ -31,7 +31,7 @@ namespace spacer {
ast_manager& m;
public:
unsat_core_plugin(unsat_core_learner& learner);
virtual ~unsat_core_plugin() {};
virtual ~unsat_core_plugin() = default;
virtual void compute_partial_core(proof* step) = 0;
virtual void finalize(){};