Replace << "c" by << 'c', and check for it in style.sh

* src/sanity/style.test: Add a test.
* iface/dve2/dve2.cc, iface/dve2/dve2check.cc, src/bin/common_output.cc,
src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc, src/bin/ltlcross.cc,
src/dstarparse/dra2ba.cc, src/dstarparse/fmterror.cc,
src/dstarparse/nsa2tgba.cc, src/kripke/kripkeprint.cc,
src/kripkeparse/fmterror.cc, src/ltlast/atomic_prop.cc,
src/ltlast/bunop.cc, src/ltltest/ltlrel.cc, src/ltltest/reduc.cc,
src/ltltest/syntimpl.cc, src/ltlvisit/dotty.cc, src/ltlvisit/lbt.cc,
src/ltlvisit/randomltl.cc, src/ltlvisit/relabel.cc,
src/ltlvisit/simplify.cc, src/ltlvisit/tostring.cc, src/misc/bitvect.cc,
src/misc/optionmap.cc, src/misc/timer.cc, src/neverparse/fmterror.cc,
src/priv/freelist.cc, src/saba/sabacomplementtgba.cc,
src/sabaalgos/sabadotty.cc, src/taalgos/dotty.cc,
src/taalgos/minimize.cc, src/tgba/bdddict.cc, src/tgba/bddprint.cc,
src/tgba/futurecondcol.cc, src/tgba/taatgba.hh,
src/tgba/tgbakvcomplement.cc, src/tgba/tgbasafracomplement.cc,
src/tgbaalgos/compsusp.cc, src/tgbaalgos/cycles.cc,
src/tgbaalgos/dotty.cc, src/tgbaalgos/dtbasat.cc,
src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/emptiness.cc,
src/tgbaalgos/gtec/gtec.cc, src/tgbaalgos/gv04.cc,
src/tgbaalgos/lbtt.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/minimize.cc, src/tgbaalgos/neverclaim.cc,
src/tgbaalgos/powerset.cc, src/tgbaalgos/replayrun.cc,
src/tgbaalgos/save.cc, src/tgbaalgos/scc.cc, src/tgbaalgos/sccfilter.cc,
src/tgbaalgos/weight.cc, src/tgbaalgos/word.cc,
src/tgbaparse/fmterror.cc, src/tgbatest/bitvect.cc,
src/tgbatest/complementation.cc, src/tgbatest/intvcmp2.cc,
src/tgbatest/intvcomp.cc, src/tgbatest/ltl2tgba.cc,
src/tgbatest/randtgba.cc: Replace << "c" by << 'c' when
appropriate.
This commit is contained in:
Alexandre Duret-Lutz 2014-01-29 14:48:52 +01:00
parent 49c66c6319
commit ba5aff2460
64 changed files with 417 additions and 398 deletions

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2009, 2012, 2013 Laboratoire de Recherche et
// Copyright (C) 2009, 2012, 2013, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
@ -218,7 +218,7 @@ namespace spot
std::ostringstream s;
// FIXME: We could be smarter and reuse unused "$n" numbers.
s << ltl::to_string(i.f) << "$" << ++i.clone_counts;
s << ltl::to_string(i.f) << '$' << ++i.clone_counts;
const ltl::formula* f =
ltl::atomic_prop::instance(s.str(),
ltl::default_environment::instance());
@ -416,7 +416,7 @@ namespace spot
unsigned s = bdd_map.size();
for (unsigned i = 0; i < s; ++i)
{
os << " " << i << " ";
os << ' ' << i << ' ';
const bdd_info& r = bdd_map[i];
switch (r.type)
{
@ -424,16 +424,16 @@ namespace spot
os << (r.refs.empty() ? "Free" : "Anon");
break;
case now:
os << "Now[" << to_string(r.f) << "]";
os << "Now[" << to_string(r.f) << ']';
break;
case next:
os << "Next[" << to_string(r.f) << "]";
os << "Next[" << to_string(r.f) << ']';
break;
case acc:
os << "Acc[" << to_string(r.f) << "]";
os << "Acc[" << to_string(r.f) << ']';
break;
case var:
os << "Var[" << to_string(r.f) << "]";
os << "Var[" << to_string(r.f) << ']';
break;
}
if (!r.refs.empty())
@ -441,10 +441,10 @@ namespace spot
os << " x" << r.refs.size() << " {";
for (ref_set::const_iterator si = r.refs.begin();
si != r.refs.end(); ++si)
os << " " << *si;
os << ' ' << *si;
os << " }";
}
os << "\n";
os << '\n';
}
os << "Anonymous lists:\n";
bdd_dict_priv::free_anonymous_list_of_type::const_iterator ai;
@ -456,7 +456,7 @@ namespace spot
}
os << "Free list:\n";
priv_->dump_free_list(os);
os << std::endl;
os << '\n';
return os;
}

View file

@ -1,8 +1,9 @@
// Copyright (C) 2009, 2012 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
// -*- coding: utf-8 -*-
// Copyright (C) 2009, 2012, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2003, 2004 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.
//
@ -63,24 +64,24 @@ namespace spot
if (want_acc)
{
o << "Acc[";
print_ltl(ref.f, o) << "]";
print_ltl(ref.f, o) << ']';
}
else
{
o << "\"";
print_ltl(ref.f, o) << "\"";
o << '"';
print_ltl(ref.f, o) << '"';
}
break;
case bdd_dict::now:
o << "Now[";
print_ltl(ref.f, o) << "]";
print_ltl(ref.f, o) << ']';
break;
case bdd_dict::next:
o << "Next[";
print_ltl(ref.f, o) << "]";
print_ltl(ref.f, o) << ']';
break;
case bdd_dict::anon:
o << "?" << v;
o << '?' << v;
}
}
@ -95,13 +96,11 @@ namespace spot
if (varset[v] < 0)
continue;
if (not_first)
*where << " ";
*where << ' ';
else
not_first = true;
if (varset[v] == 0)
// The space is important for LBTT, but we have to hide it
// from our style checking droid.
*where << "!"" ";
*where << "! ";
print_handler(*where, v);
}
}
@ -123,7 +122,7 @@ namespace spot
for (int v = 0; v < size; ++v)
if (varset[v] > 0)
{
*where << " ";
*where << ' ';
print_handler(*where, v);
}
}
@ -160,7 +159,7 @@ namespace spot
first_done = false;
bdd_allsat(b, print_accset_handler);
if (first_done)
*where << "}";
*where << '}';
return os;
}

View file

@ -1,4 +1,6 @@
// Copyright (C) 2009 Laboratoire de recherche et développement de l'Epita.
// -*- coding: utf-8 -*-
// Copyright (C) 2009, 2014 Laboratoire de recherche et développement
// de l'Epita.
//
// This file is part of Spot, a model checking library.
//
@ -81,7 +83,7 @@ namespace spot
str << ", ";
bdd_print_formula(str, get_dict(), *i);
}
str << "]";
str << ']';
return str.str();
}
}

View file

@ -242,7 +242,7 @@ namespace spot
os << "State: " << label_to_string(i->first) << std::endl;
for (i2 = i->second->begin(); i2 != i->second->end(); ++i2)
{
os << " " << format_state_set((*i2)->dst)
os << ' ' << format_state_set((*i2)->dst)
<< ", C:" << (*i2)->condition
<< ", A:" << (*i2)->acceptance_conditions << std::endl;
}

View file

@ -82,7 +82,7 @@ namespace spot
<< bdd_format_accset(a->get_dict(), condition.get_bdd())
<< "} ";
}
ss << "}";
ss << '}';
return ss.str();
}
};
@ -652,14 +652,14 @@ namespace spot
++i)
{
ss << " {" << automaton_->format_state(i->first.get())
<< ", " << i->second.format(this) << "}" << std::endl;
<< ", " << i->second.format(this) << "}\n";
}
ss << "} odd-less: {";
for (shared_state_set::const_iterator i = state_filter.begin();
i != state_filter.end();
++i)
ss << " " << automaton_->format_state(i->get()) << std::endl;
ss << " " << automaton_->format_state(i->get()) << '\n';
ss << "} }";
return ss.str();
}

View file

@ -755,7 +755,7 @@ namespace spot
}
std::cout << "node" << this_node << "[label=\"";
std::cout << this_node->name << "|";
std::cout << this_node->name << '|';
for (auto j: this_node->nodes)
{
stnum_t::const_iterator it = node_names.find(j);
@ -799,16 +799,16 @@ namespace spot
i != a->automaton.rend();
++i)
{
std::cout << "subgraph sg" << i->first << "{" << std::endl;
std::cout << "subgraph sg" << i->first << '{' << std::endl;
print_safra_tree(i->first, node_names, current_node,
nb_accepting_conditions);
std::cout << "}" << std::endl;
std::cout << "}\n";
// Successors.
for (const auto& j: i->second)
std::cout << "node" << i->first << "->"
<< "node" << j.second <<
" [label=\"" << bddset << j.first << "\"];" << std::endl;
" [label=\"" << bddset << j.first << "\"];\n";
}
// Output the real name of all states.
@ -819,10 +819,7 @@ namespace spot
std::cout << "<TR><TD>" << nn.second << "</TD><TD>"
<< a->get_sba()->format_state(nn.first)
<< "</TD></TR>\n";
std::cout << "</TABLE>\n"
<< ">]}" << std::endl;
std::cout << "}" << std::endl;
std::cout << "</TABLE>\n>]}\n}\n";
}
} // test