mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Simplify checking of container (List/HashTable, strings) sizes
- can use 'XX.empty()' instead of 'XX.size() == 0', 'XX.size() < 1' or 'XX.size() <= 0' or for simpler coding. It also has the same number of characters as '!XX.size()' and /might/ be more readable - many size checking had 'XX.size() > 0', 'XX.size() != 0', or 'XX.size() >= 1' when a simple 'XX.size()' suffices
This commit is contained in:
@ -255,7 +255,7 @@ bool Foam::edgeIntersections::inlinePerturb
|
||||
|
||||
const labelList& edgeEnds = classification_[edgeI];
|
||||
|
||||
if (edgeEnds.size() > 0)
|
||||
if (edgeEnds.size())
|
||||
{
|
||||
bool perturbStart = false;
|
||||
bool perturbEnd = false;
|
||||
@ -701,7 +701,7 @@ Foam::label Foam::edgeIntersections::removeDegenerates
|
||||
// Transfer and test.
|
||||
edgesToTest.transfer(newEdgesToTest);
|
||||
|
||||
if (edgesToTest.size() == 0)
|
||||
if (edgesToTest.empty())
|
||||
{
|
||||
FatalErrorIn("perturb") << "oops" << abort(FatalError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user