deprecate copy() in favor of make_twa_graph()

Fixes #258.

* spot/twaalgos/copy.cc: Delete, and move the code...
* spot/twa/twagraph.cc: ... in some anonymous namespace here.
* spot/twa/twagraph.hh: Adjust the make_twa_graph() overload.
* spot/twaalgos/copy.hh, NEWS: Mark copy() as deprecated and redirect
to make_twa_graph().
* doc/org/upgrade2.org, doc/org/tut51.org, python/spot/impl.i,
spot/twaalgos/dot.cc, spot/twaalgos/langmap.cc, tests/core/ikwiad.cc:
Adjust callers.
* spot/twaalgos/Makefile.am: Remove copy.cc.
This commit is contained in:
Alexandre Duret-Lutz 2017-07-25 11:18:03 +02:00
parent 1e9daa73f3
commit 8e685e00c9
12 changed files with 197 additions and 206 deletions

View file

@ -30,7 +30,6 @@
#include <spot/misc/escape.hh>
#include <spot/twa/twagraph.hh>
#include <spot/twa/formula2bdd.hh>
#include <spot/twaalgos/copy.hh>
#include <spot/twaalgos/sccinfo.hh>
#include <spot/kripke/fairkripke.hh>
#include <cstdlib>
@ -833,7 +832,7 @@ namespace spot
d.parse_opts("k");
auto aut = std::dynamic_pointer_cast<const twa_graph>(g);
if (!aut || (d.max_states_given() && aut->num_states() >= d.max_states()))
aut = copy(g, twa::prop_set::all(), true, d.max_states() - 1);
aut = make_twa_graph(g, twa::prop_set::all(), true, d.max_states() - 1);
d.print(aut);
return os;
}