Skip to content
Snippets Groups Projects
Commit 60b56fd5 authored by andy's avatar andy
Browse files

ENH: Simplify code by using ListOps

parent f6585771
No related merge requests found
......@@ -27,6 +27,7 @@ License
#include "fvMesh.H"
#include "fvMatrices.H"
#include "volFields.H"
#include "ListOps.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
......@@ -351,15 +352,7 @@ Foam::label Foam::fv::option::applyToField(const word& fieldName) const
return 0;
}
forAll(fieldNames_, i)
{
if (fieldNames_[i] == fieldName)
{
return i;
}
}
return -1;
return findIndex(fieldNames_, fieldName);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment