Deprecate ltl::destroy(f) in favor of f->destroy()
* src/ltlast/formula.cc, src/ltlast/formula.hh (formula::clone): Transform this static function into a member function. * src/ltlvisit/destroy.hh (destroy): Document and declare as deprecated. * bench/split-product/cutscc.cc, iface/gspn/ltlgspn.cc, src/eltlparse/eltlparse.yy, src/eltltest/acc.cc, src/evtgbaalgos/tgba2evtgba.cc, src/evtgbatest/ltl2evtgba.cc, src/ltlast/automatop.cc, src/ltlast/binop.cc, src/ltlast/multop.cc, src/ltlast/unop.cc, src/ltlenv/declenv.cc, src/ltlenv/declenv.hh, src/ltlparse/ltlparse.yy, src/ltltest/equals.cc, src/ltltest/randltl.cc, src/ltltest/readltl.cc, src/ltltest/reduc.cc, src/ltltest/syntimpl.cc, src/ltltest/tostring.cc, src/ltlvisit/destroy.cc src/ltlvisit/basicreduce.cc, src/ltlvisit/contain.cc, src/ltlvisit/reduce.cc, src/ltlvisit/syntimpl.cc, src/tgba/bdddict.cc, src/tgba/bddprint.cc, src/tgba/taa.cc, src/tgba/tgbabddconcretefactory.cc, src/tgba/tgbaexplicit.cc, src/tgba/tgbafromfile.cc, src/tgbaalgos/eltl2tgba_lacim.cc, src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/ltl2tgba_lacim.cc, src/tgbaalgos/neverclaim.cc, src/tgbaalgos/randomgraph.cc, src/tgbaparse/tgbaparse.yy, src/tgbatest/complementation.cc, src/tgbatest/eltl2tgba.cc, src/tgbatest/ltl2tgba.cc, src/tgbatest/ltlprod.cc, src/tgbatest/mixprod.cc, src/tgbatest/randtgba.cc, src/tgbatest/reductgba.cc, wrap/python/cgi/ltl2tgba.in, wrap/python/tests/ltl2tgba.py, wrap/python/tests/ltlparse.py, wrap/python/tests/ltlsimple.py: Adjust destroy() usage, and remove the #include "destroy.hh" when appropriate.
This commit is contained in:
parent
48fb19ea44
commit
77df39b4dd
53 changed files with 260 additions and 259 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (C) 2003, 2004, 2005, 2009 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
// Copyright (C) 2003, 2004, 2005, 2009 Laboratoire d'Informatique de
|
||||
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
// Université Pierre et Marie Curie.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace spot
|
|||
|
||||
// Dereference children.
|
||||
for (unsigned n = 0; n < size(); ++n)
|
||||
formula::destroy(nth(n));
|
||||
nth(n)->destroy();
|
||||
|
||||
delete children_;
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ namespace spot
|
|||
{
|
||||
// The instance already exists.
|
||||
for (vec::iterator vi = v->begin(); vi != v->end(); ++vi)
|
||||
formula::destroy(*vi);
|
||||
(*vi)->destroy();
|
||||
delete v;
|
||||
return static_cast<automatop*>(i->second->clone());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ namespace spot
|
|||
instances.erase(i);
|
||||
|
||||
// Dereference children.
|
||||
formula::destroy(first());
|
||||
formula::destroy(second());
|
||||
first()->destroy();
|
||||
second()->destroy();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -143,8 +143,8 @@ namespace spot
|
|||
if (i != instances.end())
|
||||
{
|
||||
// This instance already exists.
|
||||
formula::destroy(first);
|
||||
formula::destroy(second);
|
||||
first->destroy();
|
||||
second->destroy();
|
||||
return static_cast<binop*>(i->second->clone());
|
||||
}
|
||||
binop* ap = new binop(op, first, second);
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ namespace spot
|
|||
}
|
||||
|
||||
void
|
||||
formula::destroy(formula* f)
|
||||
formula::destroy() const
|
||||
{
|
||||
if (f->unref_())
|
||||
delete f;
|
||||
if (const_cast<formula*>(this)->unref_())
|
||||
delete this;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ namespace spot
|
|||
///
|
||||
/// This decrements the reference counter of this node (if one is
|
||||
/// used) and can free the object.
|
||||
static void destroy(formula* f);
|
||||
void destroy() const;
|
||||
|
||||
/// Return a canonic representation of the formula
|
||||
const std::string& dump() const;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace spot
|
|||
|
||||
// Dereference children.
|
||||
for (unsigned n = 0; n < size(); ++n)
|
||||
formula::destroy(nth(n));
|
||||
nth(n)->destroy();
|
||||
|
||||
delete children_;
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ namespace spot
|
|||
unsigned ps = p->size();
|
||||
for (unsigned n = 0; n < ps; ++n)
|
||||
inlined.push_back(p->nth(n)->clone());
|
||||
formula::destroy(*i);
|
||||
(*i)->destroy();
|
||||
i = v->erase(i);
|
||||
}
|
||||
else
|
||||
|
|
@ -153,7 +153,7 @@ namespace spot
|
|||
{
|
||||
if (*i == last)
|
||||
{
|
||||
formula::destroy(*i);
|
||||
(*i)->destroy();
|
||||
i = v->erase(i);
|
||||
}
|
||||
else
|
||||
|
|
@ -193,7 +193,7 @@ namespace spot
|
|||
{
|
||||
// The instance already exists.
|
||||
for (vec::iterator vi = v->begin(); vi != v->end(); ++vi)
|
||||
formula::destroy(*vi);
|
||||
(*vi)->destroy();
|
||||
delete v;
|
||||
return static_cast<multop*>(i->second->clone());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace spot
|
|||
instances.erase(i);
|
||||
|
||||
// Dereference child.
|
||||
formula::destroy(child());
|
||||
child()->destroy();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -110,7 +110,7 @@ namespace spot
|
|||
if (i != instances.end())
|
||||
{
|
||||
// This instance already exists.
|
||||
formula::destroy(child);
|
||||
child->destroy();
|
||||
return static_cast<unop*>(i->second->clone());
|
||||
}
|
||||
unop* ap = new unop(op, child);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue