avoid mark_t::count() when possible
count() may be implemented using a loop, so using it touch check count() == 1 or count() > 1 is not advisable. * spot/twa/acc.hh (mark_t::is_singleton, mark_t::has_many): Introduce these two methods to replace count()==1 and count()>1 * spot/twa/acc.cc, spot/twaalgos/cleanacc.cc, spot/twaalgos/determinize.cc, spot/twaalgos/dtwasat.cc, spot/twaalgos/iscolored.cc, spot/twaalgos/remfin.cc, spot/twaalgos/toparity.cc: Adjust usage.
This commit is contained in:
parent
c0e1b3e52a
commit
cc12d514be
8 changed files with 219 additions and 197 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2013-2019 Laboratoire de Recherche
|
||||
// Copyright (C) 2013-2020 Laboratoire de Recherche
|
||||
// et Développement de l'Epita.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -153,7 +153,7 @@ namespace spot
|
|||
break;
|
||||
case acc_cond::acc_op::Fin:
|
||||
fin |= pos[-1].mark;
|
||||
assert(pos[-1].mark.count() == 1);
|
||||
assert(pos[-1].mark.is_singleton());
|
||||
pos -= 2;
|
||||
break;
|
||||
case acc_cond::acc_op::Inf:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue