Commit aa2374c5 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Cosmetics.

* src/sanity/style.test: Catch extra space around operator declarations.
* src/ltlast/automatop.hh, src/ltlast/multop.hh,
src/tgba/tgbabddcoredata.cc, src/tgba/tgbabddcoredata.hh,
src/tgbaalgos/simulation.cc: Fix them.
parent cffbb7b4
...@@ -81,7 +81,7 @@ namespace spot ...@@ -81,7 +81,7 @@ namespace spot
struct tripletcmp struct tripletcmp
{ {
bool bool
operator () (const triplet& p1, const triplet& p2) const operator()(const triplet& p1, const triplet& p2) const
{ {
if (p1.first.first != p2.first.first) if (p1.first.first != p2.first.first)
return p1.first.first < p2.first.first; return p1.first.first < p2.first.first;
......
...@@ -157,7 +157,7 @@ namespace spot ...@@ -157,7 +157,7 @@ namespace spot
struct paircmp struct paircmp
{ {
bool bool
operator () (const pair& p1, const pair& p2) const operator()(const pair& p1, const pair& p2) const
{ {
if (p1.first != p2.first) if (p1.first != p2.first)
return p1.first < p2.first; return p1.first < p2.first;
......
...@@ -131,15 +131,25 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do ...@@ -131,15 +131,25 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
# The 'r' allows operator&& # The 'r' allows operator&&
grep '[^ r]&&[^ ]' $tmp && grep '[^ r]&&[^ ]' $tmp &&
diag 'Space arround binary operators.' diag 'Space around binary operators.'
# The 'r' allows operator|| # The 'r' allows operator||
grep '[^ r]||[^ ]' $tmp && grep '[^ r]||[^ ]' $tmp &&
diag 'Space arround binary operators.' diag 'Space around binary operators.'
# The 'r' allows operator== # The 'r' allows operator==
grep '[^ r][!<>=]=[^ ]' $tmp && grep '[^ r<>][!<>=]=[^ ]' $tmp &&
diag 'Space arround binary operators.' diag 'Space around binary operators.'
# The 'r' allows operator<<=
grep '[^ r][<>][<>]=[^ ]' $tmp &&
diag 'Space around binary operators.'
grep 'operator[^a-zA-Z0-9_(]*[ ][^a-zA-Z0-9_(]*(' $tmp &&
diag 'Write operatorXX(...) without spaces around XX.'
grep 'operator[^(]* (' $tmp &&
diag 'No space before ('
grep '[ ]default:[^:].*;' $tmp && grep '[ ]default:[^:].*;' $tmp &&
diag 'Label should be on their own line.' diag 'Label should be on their own line.'
......
// Copyright (C) 2009, 2011 Laboratoire de Recherche et Dveloppement de // Copyright (C) 2009, 2011, 2012 Laboratoire de Recherche et
// l'Epita (LRDE). // Dveloppement de l'Epita (LRDE).
// Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
// dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre // dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre
// et Marie Curie. // et Marie Curie.
...@@ -91,7 +91,7 @@ namespace spot ...@@ -91,7 +91,7 @@ namespace spot
} }
const tgba_bdd_core_data& const tgba_bdd_core_data&
tgba_bdd_core_data::operator= (const tgba_bdd_core_data& copy) tgba_bdd_core_data::operator=(const tgba_bdd_core_data& copy)
{ {
if (this != &copy) if (this != &copy)
{ {
......
// Copyright (C) 2009, 2011 Laboratoire de Recherche et Développement de // Copyright (C) 2009, 2011, 2012 Laboratoire de Recherche et
// l'Epita (LRDE). // Développement de l'Epita (LRDE).
// Copyright (C) 2003, 2005 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2003, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre // département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie. // et Marie Curie.
...@@ -134,7 +134,7 @@ namespace spot ...@@ -134,7 +134,7 @@ namespace spot
tgba_bdd_core_data(const tgba_bdd_core_data& left, tgba_bdd_core_data(const tgba_bdd_core_data& left,
const tgba_bdd_core_data& right); const tgba_bdd_core_data& right);
const tgba_bdd_core_data& operator= (const tgba_bdd_core_data& copy); const tgba_bdd_core_data& operator=(const tgba_bdd_core_data& copy);
/// \brief Update the variable sets to take a new pair of variables into /// \brief Update the variable sets to take a new pair of variables into
/// account. /// account.
......
...@@ -112,7 +112,7 @@ namespace spot ...@@ -112,7 +112,7 @@ namespace spot
{ {
} }
inline bool operator!= (const automaton_size& r) inline bool operator!=(const automaton_size& r)
{ {
return transitions != r.transitions || states != r.states; return transitions != r.transitions || states != r.states;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment