Skip to content

Commit f22d3cf

Browse files
romainbrenguierDaniel Kroening
authored andcommitted
Use override instead of virtual when overriding
No functional change.
1 parent 416687c commit f22d3cf

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

src/solvers/smt2/smt2_conv.h

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,31 @@ class smt2_convt:public prop_convt
104104
write_header();
105105
}
106106

107-
virtual ~smt2_convt() { }
108-
virtual resultt dec_solve();
107+
~smt2_convt() override = default;
108+
resultt dec_solve() override;
109109

110110
bool use_FPA_theory;
111111
bool use_datatypes;
112112
bool use_array_of_bool;
113113
bool emit_set_logic;
114114

115-
// overloading interfaces
116-
virtual literalt convert(const exprt &expr);
117-
virtual void set_frozen(literalt) { /* not needed */ }
118-
virtual void set_to(const exprt &expr, bool value);
119-
virtual exprt get(const exprt &expr) const;
120-
virtual std::string decision_procedure_text() const { return "SMT2"; }
121-
virtual void print_assignment(std::ostream &) const;
122-
virtual tvt l_get(literalt l) const;
123-
virtual void set_assumptions(const bvt &bv) { assumptions=bv; }
124-
125-
// new stuff
115+
literalt convert(const exprt &expr) override;
116+
void set_frozen(literalt) override
117+
{ /* not needed */
118+
}
119+
void set_to(const exprt &expr, bool value) override;
120+
exprt get(const exprt &expr) const override;
121+
std::string decision_procedure_text() const override
122+
{
123+
return "SMT2";
124+
}
125+
void print_assignment(std::ostream &out) const override;
126+
tvt l_get(literalt l) const override;
127+
void set_assumptions(const bvt &bv) override
128+
{
129+
assumptions = bv;
130+
}
131+
126132
void convert_expr(const exprt &);
127133
void convert_type(const typet &);
128134
void convert_literal(const literalt);

0 commit comments

Comments
 (0)