toparity: take a const_twa_graph_ptr as input

* spot/twaalgos/toparity.hh (to_parity): Take a const TWA as input, as
in Spot 2.8.
* spot/twaalgos/toparity.cc: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2020-04-05 11:07:20 +02:00
parent 2b918d1c02
commit 682ec77b0b
2 changed files with 4 additions and 4 deletions

View file

@ -1613,8 +1613,8 @@ to_parity_options options;
std::vector<std::string>* names;
}; // car_generator
static twa_graph_ptr
remove_false_transitions(const twa_graph_ptr a)
static const_twa_graph_ptr
remove_false_transitions(const const_twa_graph_ptr& a)
{
// Do not do anything if the automaton has no false transition
for (auto edge : a->edges())
@ -1638,7 +1638,7 @@ std::vector<std::string>* names;
twa_graph_ptr
to_parity(const twa_graph_ptr &aut, const to_parity_options options)
to_parity(const const_twa_graph_ptr &aut, const to_parity_options options)
{
return car_generator(remove_false_transitions(aut), options).run();
}

View file

@ -74,7 +74,7 @@ namespace spot
/// The \a options argument can be used to selectively disable some of the
/// optimizations.
SPOT_API twa_graph_ptr
to_parity(const twa_graph_ptr &aut,
to_parity(const const_twa_graph_ptr &aut,
const to_parity_options options = to_parity_options());
/// \ingroup twa_acc_transform