mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +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:
@ -160,7 +160,7 @@ void Foam::surfaceIntersection::removeDuplicates
|
||||
// Insert others only if they differ from one before
|
||||
label newVertI = map[oldElems[vertI]];
|
||||
|
||||
if (newVertI != elems[elems.size()-1])
|
||||
if (newVertI != elems.last())
|
||||
{
|
||||
elems[elemI++] = newVertI;
|
||||
}
|
||||
@ -300,7 +300,7 @@ void Foam::surfaceIntersection::writeIntersectedEdges
|
||||
<< extraVerts[i] + surf.nPoints() + 1 << endl;
|
||||
}
|
||||
|
||||
os << "l " << extraVerts[extraVerts.size()-1] + surf.nPoints() + 1
|
||||
os << "l " << extraVerts.last() + surf.nPoints() + 1
|
||||
<< ' ' << e.end()+1 << endl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user