Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use override more. #7059

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/ast/simplifiers/dependent_expr_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ class dependent_expr_state {
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 {}

};

Expand Down
2 changes: 1 addition & 1 deletion src/ast/simplifiers/model_reconstruction_trail.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/math/lp/lar_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/solver/simplifier_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down