* src/tgbaalgos/emptiness_stats.hh: Modernize.
This commit is contained in:
parent
d9d46492cb
commit
5345cae839
1 changed files with 12 additions and 11 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// -*- coding: utf-8 -*-
|
||||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
// Copyright (C) 2015 Laboratoire de Recherche et Développement de
|
||||||
// et Marie Curie.
|
// l'Epita (LRDE).
|
||||||
|
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6
|
||||||
|
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
||||||
|
// Pierre et Marie Curie.
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -40,7 +43,7 @@ namespace spot
|
||||||
unsigned
|
unsigned
|
||||||
get(const char* str) const
|
get(const char* str) const
|
||||||
{
|
{
|
||||||
stats_map::const_iterator i = stats.find(str);
|
auto i = stats.find(str);
|
||||||
assert(i != stats.end());
|
assert(i != stats.end());
|
||||||
return (this->*i->second)();
|
return (this->*i->second)();
|
||||||
}
|
}
|
||||||
|
|
@ -74,9 +77,8 @@ namespace spot
|
||||||
{
|
{
|
||||||
if (!set)
|
if (!set)
|
||||||
{
|
{
|
||||||
unsigned_statistics::stats_map::const_iterator i;
|
for (auto& i: o.stats)
|
||||||
for (i = o.stats.begin(); i != o.stats.end(); ++i)
|
stats[i.first] = (o.*i.second)();
|
||||||
stats[i->first] = (o.*i->second)();
|
|
||||||
set = true;
|
set = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -92,13 +94,12 @@ namespace spot
|
||||||
bool
|
bool
|
||||||
operator==(const unsigned_statistics_copy& o) const
|
operator==(const unsigned_statistics_copy& o) const
|
||||||
{
|
{
|
||||||
stats_map::const_iterator i;
|
for (auto& i: stats)
|
||||||
for (i = stats.begin(); i != stats.end(); ++i)
|
|
||||||
{
|
{
|
||||||
stats_map::const_iterator i2 = o.stats.find(i->first);
|
auto i2 = o.stats.find(i.first);
|
||||||
if (i2 == o.stats.end())
|
if (i2 == o.stats.end())
|
||||||
return false;
|
return false;
|
||||||
if (i->second != i2->second)
|
if (i.second != i2->second)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue