Make it possible to clone const formulae.

* src/ltlast/formula.hh, src/ltlast/formula.cc (clone): Declare
as const.
This commit is contained in:
Alexandre Duret-Lutz 2009-11-08 19:36:35 +01:00
parent b0888257f8
commit e44f1b8997
3 changed files with 11 additions and 4 deletions

View file

@ -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()

View file

@ -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