mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +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:
@ -147,14 +147,14 @@ int USERD_set_filenames
|
||||
|
||||
bool lagrangianNamesFound = false;
|
||||
label n = 0;
|
||||
while ((!lagrangianNamesFound) && (n<Num_time_steps))
|
||||
while (!lagrangianNamesFound && n < Num_time_steps)
|
||||
{
|
||||
runTime.setTime(TimeList[n+1], n+1);
|
||||
|
||||
Cloud<passiveParticle> lagrangian(*meshPtr);
|
||||
|
||||
n++;
|
||||
if (lagrangian.size()>0)
|
||||
if (lagrangian.size())
|
||||
{
|
||||
lagrangianNamesFound = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user