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

This commit is contained in:
wmayer
2023-08-15 11:58:18 +02:00
committed by wwmayer
parent 516795c986
commit 7c42bc5e60
6 changed files with 79 additions and 80 deletions

View File

@@ -192,9 +192,8 @@ public:
std::vector< std::vector<MeshCore::FacetIndex> > meshSegments;
std::size_t numMeshFaces = 0;
for (std::size_t i = 0; i < domains.size(); ++i) {
for (const auto& domain : domains) {
std::size_t numDomainFaces = 0;
const Part::TopoShape::Domain& domain = domains[i];
for (std::size_t j = 0; j < domain.facets.size(); ++j) {
const Part::TopoShape::Facet& tria = domain.facets[j];
x1 = domain.points[tria.I1].x;
@@ -525,8 +524,8 @@ Mesh::MeshObject* Mesher::createMesh() const
mesh->ShapeToMesh(aNull);
mesh->Clear();
delete mesh;
for (std::list<SMESH_Hypothesis*>::iterator it = hypoth.begin(); it != hypoth.end(); ++it)
delete *it;
for (auto it : hypoth)
delete it;
return meshdata;
#endif // HAVE_SMESH