FEM: modernize C++: use range-based for loop

This commit is contained in:
wmayer
2023-08-14 19:45:24 +02:00
committed by wwmayer
parent 26ea9e4ea4
commit 89b9a7ae0f
37 changed files with 460 additions and 534 deletions

View File

@@ -287,16 +287,16 @@ Py::List ViewProviderFemMeshPy::getVisibleElementFaces() const
// sorting out double faces through higher order elements and null entries
long elementOld = 0, faceOld = 0;
for (std::vector<unsigned long>::const_iterator it = visElmFc.begin(); it != visElmFc.end(); ++it) {
if (*it == 0)
for (unsigned long it : visElmFc) {
if (it == 0)
continue;
long element = *it >> 3;
long face = (*it & 7) + 1;
long element = it >> 3;
long face = (it & 7) + 1;
if (element == elementOld && face == faceOld)
continue;
trans.push_back(*it);
trans.push_back(it);
elementOld = element;
faceOld = face;
}