twacube: mark get_initial method as const

* spot/twacube/twacube.hh,spot/twacube/twacube.cc: Here.
This commit is contained in:
Antoine Martin 2020-04-18 20:59:49 +02:00 committed by Etienne Renault
parent 0ad380ef12
commit fcf6bb3d3d
2 changed files with 3 additions and 3 deletions

View file

@ -81,10 +81,10 @@ namespace spot
init_ = init;
}
unsigned twacube::get_initial()
unsigned twacube::get_initial() const
{
if (theg_.num_states() == 0)
new_state();
throw std::runtime_error("automaton has no state at all");
return init_;
}

View file

@ -148,7 +148,7 @@ namespace spot
void set_initial(unsigned init);
/// \brief Returns the id of the initial state in the automaton.
unsigned get_initial();
unsigned get_initial() const;
/// \brief Accessor for a state from its id.
cstate* state_from_int(unsigned i);