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:
Mark Olesen
2009-01-10 20:28:06 +01:00
parent 16aaf5b54e
commit 95dcb6ded7
211 changed files with 713 additions and 832 deletions

View File

@ -206,7 +206,7 @@ void mapLagrangian(const meshToMesh& meshToMeshInterp)
// Do closer inspection for unmapped particles
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (unmappedSource.size() > 0)
if (unmappedSource.size())
{
meshSearch targetSearcher(meshTarget, false);
@ -237,7 +237,7 @@ void mapLagrangian(const meshToMesh& meshToMeshInterp)
Info<< " after additional mesh searching found "
<< targetParcels.size() << " parcels in target mesh." << endl;
if (addParticles.size() > 0)
if (addParticles.size())
{
IOPosition<passiveParticle>(targetParcels).write();