STYLE: prefer push_uniq() to appendUniq

- more consistency with push_back etc.
This commit is contained in:
Mark Olesen
2023-08-21 16:56:35 +02:00
parent 2395e493d1
commit 698e05eeb3
20 changed files with 42 additions and 78 deletions

View File

@ -468,8 +468,8 @@ inline Foam::List<Foam::label> Foam::conformalVoronoiMesh::processorsAttached
forAll(c1Procs, aPI)
{
procsAttached.appendUniq(c1Procs[aPI]);
procsAttached.appendUniq(c2Procs[aPI]);
procsAttached.push_uniq(c1Procs[aPI]);
procsAttached.push_uniq(c2Procs[aPI]);
}
return List<label>(procsAttached);

View File

@ -46,8 +46,8 @@ void Foam::shortEdgeFilter2D::assignBoundaryPointRegions
const edge& e = iter.key();
const label regi = iter.val();
boundaryPointRegions[e.start()].appendUniq(regi);
boundaryPointRegions[e.end()].appendUniq(regi);
boundaryPointRegions[e.first()].push_uniq(regi);
boundaryPointRegions[e.second()].push_uniq(regi);
}
}
@ -66,7 +66,7 @@ void Foam::shortEdgeFilter2D::updateEdgeRegionMap
const edgeList& edges = surfMesh.edges();
const labelList& meshPoints = surfMesh.meshPoints();
patchSizes.setSize(patchNames_.size(), 0);
patchSizes.resize_nocopy(patchNames_.size());
patchSizes = 0;
forAll(edges, edgeI)
@ -78,15 +78,13 @@ void Foam::shortEdgeFilter2D::updateEdgeRegionMap
const edge& e = edges[edgeI];
const label startI = meshPoints[e[0]];
const label endI = meshPoints[e[1]];
label region = -1;
const DynamicList<label> startPtRegions =
boundaryPtRegions[surfPtToBoundaryPt[startI]];
const DynamicList<label> endPtRegions =
boundaryPtRegions[surfPtToBoundaryPt[endI]];
const DynamicList<label>& startPtRegions =
boundaryPtRegions[surfPtToBoundaryPt[meshPoints[e.first()]]];
const DynamicList<label>& endPtRegions =
boundaryPtRegions[surfPtToBoundaryPt[meshPoints[e.second()]]];
if (startPtRegions.size() > 1 && endPtRegions.size() > 1)
{

View File

@ -518,7 +518,7 @@ void Foam::meshDualiser::createFacesAroundEdge
if (startDual != -1)
{
verts.appendUniq(startDual);
verts.push_uniq(startDual);
}
}
break;