Commit 53efb24a authored by Mark OLESEN's avatar Mark OLESEN
Browse files

STYLE: use ListOps::uniqueEqOp instead of local definition

parent 1dd7362a
......@@ -392,37 +392,6 @@ void checkZoneInside
}
// To combineReduce a labelList. Filters out duplicates.
class uniqueEqOp
{
public:
void operator()(labelList& x, const labelList& y) const
{
if (x.empty())
{
if (y.size())
{
x = y;
}
}
else
{
forAll(y, yi)
{
if (!x.found(y[yi]))
{
label sz = x.size();
x.setSize(sz+1);
x[sz] = y[yi];
}
}
}
}
};
// Calculate global pp faces per pp edge.
labelListList globalEdgeFaces
(
......@@ -449,7 +418,7 @@ labelListList globalEdgeFaces
mesh,
ppMeshEdges,
globalEdgeFaces,
uniqueEqOp(),
ListOps::uniqueEqOp<label>(),
labelList() // null value
);
......
......@@ -657,7 +657,7 @@ Foam::labelListList Foam::addPatchCellLayer::globalEdgeFaces
(
mesh,
globalEdgeFaces,
uniqueEqOp(),
ListOps::uniqueEqOp<label>(),
labelList() // null value
);
......
......@@ -125,40 +125,6 @@ class globalIndex;
class addPatchCellLayer
{
// Private classes
// To combineReduce a labelList. Filters out duplicates.
class uniqueEqOp
{
public:
void operator()(labelList& x, const labelList& y) const
{
if (x.empty())
{
if (y.size())
{
x = y;
}
}
else
{
forAll(y, yi)
{
if (!x.found(y[yi]))
{
label sz = x.size();
x.setSize(sz+1);
x[sz] = y[yi];
}
}
}
}
};
// Private data
//- Reference to mesh
......@@ -330,8 +296,8 @@ public:
// Edit
//- Per patch edge the pp faces (in global indices) using it. Uses
// uniqueEqOp() to remove duplicates.
//- Per patch edge the pp faces (in global indices) using it.
// Uses ListOps::uniqueEqOp to remove duplicates.
static labelListList globalEdgeFaces
(
const polyMesh&,
......
Supports Markdown
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