mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
Use new last() method for List-type classes
- use first() method in some places as well where it helps clarity - there are a few remaining cases: git grep 'size()-1]'
This commit is contained in:
@ -8,7 +8,7 @@ HashTable< HashTable<word> > cloudFields;
|
||||
|
||||
if (timeDirs.size())
|
||||
{
|
||||
IOobjectList objs(mesh, timeDirs[timeDirs.size()-1].name());
|
||||
IOobjectList objs(mesh, timeDirs.last().name());
|
||||
|
||||
forAllConstIter(IOobjectList, objs, fieldIter)
|
||||
{
|
||||
@ -34,7 +34,7 @@ if (timeDirs.size())
|
||||
fileNameList cloudDirs = readDir
|
||||
(
|
||||
runTime.path()
|
||||
/ timeDirs[timeDirs.size()-1].name()
|
||||
/ timeDirs.last().name()
|
||||
/ regionPrefix
|
||||
/ cloud::prefix,
|
||||
fileName::DIRECTORY
|
||||
@ -54,7 +54,7 @@ if (timeDirs.size())
|
||||
IOobjectList objs
|
||||
(
|
||||
mesh,
|
||||
timeDirs[timeDirs.size()-1].name(),
|
||||
timeDirs.last().name(),
|
||||
cloud::prefix/cloudName
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user