forbid the use of std::endl on std::cerr
std::cerr will flush after each operator<< by default, so it's simpler to use \n instead of std::endl, especially if we can merge \n into the previous string. Ideally we should prefer \n for std::cout as well, but there are reasonable cases where we want to call std::endl there, so it's hard to enforce. * tests/sanity/style.test: Diagnose occurrences of cerr.*<<.*endl. * bin/autcross.cc, bin/autfilt.cc, bin/ltlcross.cc, bin/ltlsynt.cc, spot/tl/formula.cc, spot/twa/bdddict.cc, tests/core/checkpsl.cc, tests/core/checkta.cc, tests/core/consterm.cc, tests/core/emptchk.cc, tests/core/equalsf.cc, tests/core/ikwiad.cc, tests/core/kind.cc, tests/core/length.cc, tests/core/ltlrel.cc, tests/core/parity.cc, tests/core/randtgba.cc, tests/core/reduc.cc, tests/core/syntimpl.cc, tests/ltsmin/modelcheck.cc: Fix them.
This commit is contained in:
parent
b4cced9ba8
commit
09c93a3a3d
21 changed files with 148 additions and 170 deletions
|
|
@ -1736,7 +1736,7 @@ namespace spot
|
|||
{
|
||||
if (!cnt++)
|
||||
std::cerr << "*** m.uniq is not empty ***\n";
|
||||
i->dump(std::cerr) << std::endl;
|
||||
i->dump(std::cerr) << '\n';
|
||||
}
|
||||
return cnt == 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2009, 2012-2018 Laboratoire de Recherche et
|
||||
// Copyright (C) 2009, 2012-2019 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2003-2006 Laboratoire d'Informatique de Paris 6
|
||||
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
||||
|
|
@ -346,17 +346,17 @@ namespace spot
|
|||
{
|
||||
if (var_seen)
|
||||
{
|
||||
std::cerr << "var_map is empty but Var in map" << std::endl;
|
||||
std::cerr << "var_map is empty but Var in map\n";
|
||||
fail = true;
|
||||
}
|
||||
if (acc_seen)
|
||||
{
|
||||
std::cerr << "acc_map is empty but Acc in map" << std::endl;
|
||||
std::cerr << "acc_map is empty but Acc in map\n";
|
||||
fail = true;
|
||||
}
|
||||
if (refs_seen)
|
||||
{
|
||||
std::cerr << "maps are empty but var_refs is not" << std::endl;
|
||||
std::cerr << "maps are empty but var_refs is not\n";
|
||||
fail = true;
|
||||
}
|
||||
if (!fail)
|
||||
|
|
@ -364,7 +364,7 @@ namespace spot
|
|||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "some maps are not empty" << std::endl;
|
||||
std::cerr << "some maps are not empty\n";
|
||||
}
|
||||
dump(std::cerr);
|
||||
abort();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue