twa_graph: simplify two precondition checks
* spot/twa/twagraph.hh (state_acc_sets, state_is_accepting): Do not check num_sets()==0 since this would imply prop_state_acc().
This commit is contained in:
parent
034620c521
commit
2b07326217
1 changed files with 2 additions and 2 deletions
|
|
@ -469,7 +469,7 @@ namespace spot
|
|||
|
||||
acc_cond::mark_t state_acc_sets(unsigned s) const
|
||||
{
|
||||
if (SPOT_UNLIKELY(!((bool)prop_state_acc() || num_sets() == 0)))
|
||||
if (SPOT_UNLIKELY(!(bool)prop_state_acc()))
|
||||
throw std::runtime_error
|
||||
("state_acc_sets() should only be called on "
|
||||
"automata with state-based acceptance");
|
||||
|
|
@ -483,7 +483,7 @@ namespace spot
|
|||
|
||||
bool state_is_accepting(unsigned s) const
|
||||
{
|
||||
if (SPOT_UNLIKELY(!((bool)prop_state_acc() || num_sets() == 0)))
|
||||
if (SPOT_UNLIKELY(!(bool)prop_state_acc()))
|
||||
throw std::runtime_error
|
||||
("state_is_accepting() should only be called on "
|
||||
"automata with state-based acceptance");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue