3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00

Use override more. (#7059)

This commit is contained in:
Bruce Mitchener 2023-12-15 15:44:57 +07:00 committed by GitHub
parent f6e69d43a3
commit e90a844508
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View file

@ -105,14 +105,14 @@ public:
class default_dependent_expr_state : public dependent_expr_state {
public:
default_dependent_expr_state(ast_manager& m): dependent_expr_state(m) {}
virtual unsigned qtail() const { return 0; }
virtual dependent_expr const& operator[](unsigned i) { throw default_exception("unexpected access"); }
virtual void update(unsigned i, dependent_expr const& j) { throw default_exception("unexpected update"); }
virtual void add(dependent_expr const& j) { throw default_exception("unexpected addition"); }
virtual bool inconsistent() { return false; }
virtual model_reconstruction_trail& model_trail() { throw default_exception("unexpected access to model reconstruction"); }
virtual bool updated() { return false; }
virtual void reset_updated() {}
unsigned qtail() const override { return 0; }
dependent_expr const& operator[](unsigned i) override { throw default_exception("unexpected access"); }
void update(unsigned i, dependent_expr const& j) override { throw default_exception("unexpected update"); }
void add(dependent_expr const& j) override { throw default_exception("unexpected addition"); }
bool inconsistent() override { return false; }
model_reconstruction_trail& model_trail() override { throw default_exception("unexpected access to model reconstruction"); }
bool updated() override { return false; }
void reset_updated() override {}
};

View file

@ -90,7 +90,7 @@ class model_reconstruction_trail {
struct undo_model_var : public trail {
model_reconstruction_trail& s;
undo_model_var(model_reconstruction_trail& s) : s(s) {}
virtual void undo() {
void undo() override {
s.m_model_vars.mark(s.m_model_vars_trail.back(), false);
s.m_model_vars_trail.pop_back();
}

View file

@ -1490,7 +1490,7 @@ namespace lp {
struct lar_solver::undo_add_column : public trail {
lar_solver& s;
undo_add_column(lar_solver& s) : s(s) {}
virtual void undo() {
void undo() override {
s.remove_last_column_from_tableau();
s.m_columns_to_ul_pairs.pop_back();
unsigned j = s.m_columns_to_ul_pairs.size();

View file

@ -39,7 +39,7 @@ class simplifier_solver : public solver {
bool m_updated = false;
dep_expr_state(simplifier_solver& s) :dependent_expr_state(s.m), s(s), m_reconstruction_trail(s.m, m_trail) {}
~dep_expr_state() override {}
virtual unsigned qtail() const override { return s.m_fmls.size(); }
unsigned qtail() const override { return s.m_fmls.size(); }
dependent_expr const& operator[](unsigned i) override { return s.m_fmls[i]; }
void update(unsigned i, dependent_expr const& j) override {
SASSERT(j.fml());