From 4d4fc641b58e7a24b4552474c54402680237f6d8 Mon Sep 17 00:00:00 2001 From: Guillaume Sadegh Date: Tue, 9 Jun 2009 18:59:53 +0200 Subject: [PATCH] * src/tgba/tgbacomplement.cc, src/tgbatest/complementation.cc: Fix style. --- ChangeLog | 4 ++++ src/tgba/tgbacomplement.cc | 22 ++++++++++++---------- src/tgbatest/complementation.cc | 9 ++++++--- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb737bffe..140c45163 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-06-09 Guillaume Sadegh + + * src/tgba/tgbacomplement.cc, src/tgbatest/complementation.cc: Fix style. + 2009-06-07 Guillaume Sadegh * src/tgba/tgbacomplement.cc (state_complement::hash): Improve diff --git a/src/tgba/tgbacomplement.cc b/src/tgba/tgbacomplement.cc index b1c7f58dd..f991c2cb3 100644 --- a/src/tgba/tgbacomplement.cc +++ b/src/tgba/tgbacomplement.cc @@ -245,7 +245,9 @@ namespace spot for (subset_t::const_iterator i = nodes.begin(); i != nodes.end(); ++i) hash ^= (*i)->hash(); - for (child_list::const_iterator i = children.begin(); i != children.end(); ++i) + for (child_list::const_iterator i = children.begin(); + i != children.end(); + ++i) hash ^= (*i)->hash(); return hash; @@ -332,7 +334,7 @@ namespace spot (*i)->branch_accepting(a); subset_t subset; - for(subset_t::const_iterator i = nodes.begin(); i != nodes.end(); ++i) + for (subset_t::const_iterator i = nodes.begin(); i != nodes.end(); ++i) if (a.state_is_accepting(*i)) subset.insert(*i); @@ -367,11 +369,11 @@ namespace spot t_it != transitions.end(); ++t_it) { - if (((*t_it).first & condition) != bddfalse) + if ((t_it->first & condition) != bddfalse) { - if (new_subset.find((*t_it).second) == new_subset.end()) + if (new_subset.find(t_it->second) == new_subset.end()) { - const state* s = (*t_it).second->clone(); + const state* s = t_it->second->clone(); new_subset.insert(s); } } @@ -795,7 +797,7 @@ namespace spot } std::cout << conditions; if (this_node->marked) - std::cout << "\",style=filled,fillcolor=\"gray"; + std::cout << "\", style=filled, fillcolor=\"gray"; std::cout << "\"];" << std::endl; @@ -805,7 +807,7 @@ namespace spot print_safra_tree(*i, node_names, current_node, nb_accepting_conditions); std::cout << "node" << this_node << " -> node" << *i - << "[color=\"red\",arrowhead=\"none\"];" + << "[color=\"red\", arrowhead=\"none\"];" << std::endl; } } @@ -1069,7 +1071,7 @@ namespace spot for (automaton_t::const_iterator i = automaton.begin(); i != automaton.end(); ++i) - max = std::max(max, (*i).first->max_name()); + max = std::max(max, i->first->max_name()); return max_nb_pairs_ = max + 1; } @@ -1243,7 +1245,7 @@ namespace spot bdd res = bddtrue; trans_it i; for (i = node->second.begin(); i != node->second.end(); ++i) - res |= (*i).first; + res |= i->first; return res; } @@ -1263,7 +1265,7 @@ namespace spot bdd res = bddtrue; trans_it i; for (i = node->second.begin(); i != node->second.end(); ++i) - res &= bdd_support((*i).first); + res &= bdd_support(i->first); return res; } diff --git a/src/tgbatest/complementation.cc b/src/tgbatest/complementation.cc index f5895010f..e599afe52 100644 --- a/src/tgbatest/complementation.cc +++ b/src/tgbatest/complementation.cc @@ -67,9 +67,12 @@ int main(int argc, char* argv[]) switch (argv[i][1]) { - case 's': print_safra = true; break; - case 'a': print_automaton = true; break; - case 'f': check = true; break; + case 's': + print_safra = true; break; + case 'a': + print_automaton = true; break; + case 'f': + check = true; break; default: std::cerr << "unrecognized option `-" << argv[i][1] << "'" << std::endl;