STYLE: use list methods find/found instead of findIndex function

This commit is contained in:
Mark Olesen
2017-10-24 19:07:34 +02:00
parent 5b8b689a37
commit 7d7b0bfe84
136 changed files with 369 additions and 441 deletions

View File

@ -154,14 +154,14 @@ void testSortedEdgeFaces(const triSurface& surf)
forAll(myFaces, i)
{
if (findIndex(sortMyFaces, myFaces[i]) == -1)
if (!sortMyFaces.found(myFaces[i]))
{
FatalErrorInFunction << abort(FatalError);
}
}
forAll(sortMyFaces, i)
{
if (findIndex(myFaces, sortMyFaces[i]) == -1)
if (!myFaces.found(sortMyFaces[i]))
{
FatalErrorInFunction << abort(FatalError);
}
@ -460,7 +460,7 @@ label sharedFace
const triSurface::FaceType& f = surf.localFaces()[firstFacei];
label startIndex = findIndex(f, e.start());
label startIndex = f.find(e.start());
// points in face in same order as edge
bool edgeOrder = (f[f.fcIndex(startIndex)] == e.end());
@ -471,7 +471,7 @@ label sharedFace
const labelList& eFaces = surf.sortedEdgeFaces()[sharedEdgeI];
// Get position of face in sorted edge faces
label faceIndex = findIndex(eFaces, firstFacei);
label faceIndex = eFaces.find(firstFacei);
if (edgeOrder)
{