Commit e44f1b89 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Make it possible to clone const formulae.

* src/ltlast/formula.hh, src/ltlast/formula.cc (clone): Declare
as const.
parent b0888257
2009-11-08 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Make it possible to clone const formulae.
* src/ltlast/formula.hh, src/ltlast/formula.cc (clone): Declare
as const.
2009-11-08 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Rename formula::ref and formula::unref as formula::clone
......
......@@ -27,10 +27,10 @@ namespace spot
namespace ltl
{
formula*
formula::clone()
formula::clone() const
{
ref_();
return this;
const_cast<formula*>(this)->ref_();
return const_cast<formula*>(this);
}
formula::~formula()
......
......@@ -80,7 +80,7 @@ namespace spot
///
/// This increments the reference counter of this node (if one is
/// used).
formula* clone();
formula* clone() const;
/// \brief release this node
///
/// This decrements the reference counter of this node (if one is
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment