simplify several comparison operators
* spot/twaalgos/dtbasat.cc, spot/twaalgos/dtwasat.cc, spot/twaalgos/simulation.cc: Simplify, as reported by sonarcloud.
This commit is contained in:
parent
16ad7bdf77
commit
2ba6fba29f
3 changed files with 6 additions and 20 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2013-2018, 2021, 2022 Laboratoire de Recherche et
|
||||
// Copyright (C) 2013-2018, 2021-2023 Laboratoire de Recherche et
|
||||
// Développement de l'Epita.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -77,11 +77,7 @@ namespace spot
|
|||
return true;
|
||||
if (this->src_ref > other.src_ref)
|
||||
return false;
|
||||
if (this->dst_ref < other.dst_ref)
|
||||
return true;
|
||||
if (this->dst_ref > other.dst_ref)
|
||||
return false;
|
||||
return false;
|
||||
return this->dst_ref < other.dst_ref;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2013-2022 Laboratoire de Recherche
|
||||
// Copyright (C) 2013-2023 Laboratoire de Recherche
|
||||
// et Développement de l'Epita.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -98,11 +98,7 @@ namespace spot
|
|||
return true;
|
||||
if (this->acc_ref > other.acc_ref)
|
||||
return false;
|
||||
if (this->acc_cand < other.acc_cand)
|
||||
return true;
|
||||
if (this->acc_cand > other.acc_cand)
|
||||
return false;
|
||||
return false;
|
||||
return this->acc_cand < other.acc_cand;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2012-2022 Laboratoire de Recherche et Développement
|
||||
// Copyright (C) 2012-2023 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -93,13 +93,7 @@ namespace spot
|
|||
return true;
|
||||
if (states > r.states)
|
||||
return false;
|
||||
|
||||
if (edges < r.edges)
|
||||
return true;
|
||||
if (edges > r.edges)
|
||||
return false;
|
||||
|
||||
return false;
|
||||
return edges < r.edges;
|
||||
}
|
||||
|
||||
inline bool operator>(const automaton_size& r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue