mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use list methods find/found instead of findIndex function
This commit is contained in:
@ -306,7 +306,7 @@ int main(int argc, char *argv[])
|
||||
const wordList& regions = iter();
|
||||
forAll(regions, i)
|
||||
{
|
||||
if (findIndex(regionNames, regions[i]) == -1)
|
||||
if (!regionNames.found(regions[i]))
|
||||
{
|
||||
regionNames.append(regions[i]);
|
||||
}
|
||||
|
||||
@ -67,11 +67,8 @@ Foam::lagrangianFieldDecomposer::lagrangianFieldDecomposer
|
||||
const indexedParticle& ppi = *iter();
|
||||
particleIndices_[pi++] = ppi.index();
|
||||
|
||||
label mappedTetFace = findIndex
|
||||
(
|
||||
decodedProcFaceAddressing,
|
||||
ppi.tetFace()
|
||||
);
|
||||
const label mappedTetFace =
|
||||
decodedProcFaceAddressing.find(ppi.tetFace());
|
||||
|
||||
if (mappedTetFace == -1)
|
||||
{
|
||||
|
||||
@ -189,7 +189,7 @@ int main(int argc, char *argv[])
|
||||
const wordList& regions = iter();
|
||||
forAll(regions, i)
|
||||
{
|
||||
if (findIndex(regionNames, regions[i]) == -1)
|
||||
if (!regionNames.found(regions[i]))
|
||||
{
|
||||
regionNames.append(regions[i]);
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ void Foam::parLagrangianRedistributor::findClouds
|
||||
// One of the objects is coordinates/positions so must be valid
|
||||
// cloud
|
||||
|
||||
label cloudI = findIndex(cloudNames, localCloudDirs[i]);
|
||||
label cloudI = cloudNames.find(localCloudDirs[i]);
|
||||
|
||||
objectNames[cloudI].setSize(sprayObjs.size());
|
||||
label objectI = 0;
|
||||
|
||||
@ -857,7 +857,7 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite
|
||||
// processors
|
||||
autoPtr<fvMeshSubset> subsetterPtr;
|
||||
|
||||
const bool allHaveMesh = (findIndex(haveMesh, false) == -1);
|
||||
const bool allHaveMesh = !haveMesh.found(false);
|
||||
if (!allHaveMesh)
|
||||
{
|
||||
// Find last non-processor patch.
|
||||
|
||||
Reference in New Issue
Block a user