ENH: use back(), pop_back() instead remove()

- adjust looping to resemble LIFO pattern

STYLE: adjust some string includes
This commit is contained in:
Mark Olesen
2023-01-26 12:36:53 +01:00
parent 7c60c80edd
commit eb8b51b475
25 changed files with 125 additions and 132 deletions

View File

@ -94,7 +94,7 @@ if (mesh.changing())
{
if (refCells[zoneId] != -1)
{
validCells.append(refCells[zoneId]);
validCells.push_back(refCells[zoneId]);
}
}

View File

@ -103,7 +103,7 @@
{
if (refCells[zoneId] != -1)
{
validCells.append(refCells[zoneId]);
validCells.push_back(refCells[zoneId]);
}
}

View File

@ -191,7 +191,7 @@ int main(int argc, char *argv[])
Info<< nl << "list: " << flatOutput(list) << nl << endl;
list.remove();
list.pop_back();
Info<<"remove = " << flatOutput(list) << nl;
{

View File

@ -266,11 +266,8 @@ bool Foam::featurePointConformer::createSpecialisedFeaturePoint
<< endl;
// Remove points that have just been added before returning
for (label i = 0; i < 2; ++i)
{
pts.remove();
nVert--;
}
pts.pop_back(2);
nVert -= 2;
return false;
}
@ -702,11 +699,8 @@ bool Foam::featurePointConformer::createSpecialisedFeaturePoint
<< endl;
// Remove points that have just been added before returning
for (label i = 0; i < 2; ++i)
{
pts.remove();
nVert--;
}
pts.pop_back(2);
nVert -= 2;
return false;
}