* src/sanity/style.test: Warn about places where size() is used
instead of empty(). * src/misc/bddalloc.cc (bdd_allocator::extend): Use empty() rather than size() when checking emptiness of lists. * src/tgbaalgos/reductgba_sim_del.cc, src/tgbaalgos/minimalce.cc, src/ltlvisit/basicreduce.cc, src/ltlvisit/reduce.cc, src/tgbaalgos/gtec/ce.cc, src/tgbaalgos/ltl2tgba_fm.cc, src/misc/minato.cc: Likewise. * src/ltlast/multop.cc (multop::instance): Call ->size() only once.
This commit is contained in:
parent
f0aa58034c
commit
c30823f7be
11 changed files with 57 additions and 39 deletions
|
|
@ -338,9 +338,9 @@ namespace spot
|
|||
todo.pop();
|
||||
delete iter;
|
||||
seen.erase(s);
|
||||
if (todo.size())
|
||||
if (!todo.empty())
|
||||
{
|
||||
assert(path.size());
|
||||
assert(!path.empty());
|
||||
path.pop_back();
|
||||
}
|
||||
continue;
|
||||
|
|
@ -377,7 +377,7 @@ namespace spot
|
|||
|
||||
// If we already have a best path, let see if the current
|
||||
// one is better.
|
||||
if (best_path.size())
|
||||
if (!best_path.empty())
|
||||
{
|
||||
// When comparing the merits of two paths, only the
|
||||
// acceptance conditions we are trying the traverse
|
||||
|
|
@ -491,9 +491,9 @@ namespace spot
|
|||
todo.pop();
|
||||
delete iter;
|
||||
seen.erase(s);
|
||||
if (todo.size())
|
||||
if (!todo.empty())
|
||||
{
|
||||
assert(path.size());
|
||||
assert(!path.empty());
|
||||
path.pop_back();
|
||||
}
|
||||
continue;
|
||||
|
|
@ -530,7 +530,7 @@ namespace spot
|
|||
|
||||
// If we already have a best path, let see if the current
|
||||
// one is better.
|
||||
if (best_path.size())
|
||||
if (!best_path.empty())
|
||||
{
|
||||
// When comparing the merits of two paths, only the
|
||||
// acceptance conditions we are trying the traverse
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue