refactor(kernel/formatter): formatter_cell object should not perform destructive updates
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
4398f3ec04
commit
49b2bb209d
2 changed files with 2 additions and 2 deletions
|
@ -213,7 +213,7 @@ std::ostream & operator<<(std::ostream & out, expr const & e) {
|
|||
|
||||
class simple_formatter_cell : public formatter_cell {
|
||||
public:
|
||||
virtual format operator()(environment const & env, expr const & e, options const &) {
|
||||
virtual format operator()(environment const & env, expr const & e, options const &) const {
|
||||
std::ostringstream s;
|
||||
print_expr_fn pr(s, env.prop_proof_irrel());
|
||||
pr(e);
|
||||
|
|
|
@ -30,7 +30,7 @@ class formatter_cell {
|
|||
public:
|
||||
virtual ~formatter_cell() {}
|
||||
/** \brief Format the given expression. */
|
||||
virtual format operator()(environment const & env, expr const & e, options const & opts) = 0;
|
||||
virtual format operator()(environment const & env, expr const & e, options const & opts) const = 0;
|
||||
};
|
||||
/**
|
||||
\brief Smart-pointer for the actual formatter object (aka \c formatter_cell).
|
||||
|
|
Loading…
Reference in a new issue