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

This commit is contained in:
wmayer
2023-08-15 10:55:05 +02:00
committed by wwmayer
parent 452aee7c6f
commit 7f49080952
52 changed files with 1293 additions and 1329 deletions

View File

@@ -114,10 +114,10 @@ public:
Base::BoundBox3d bbox;
unsigned long countPoints=0, countFacets=0;
std::vector<Mesh::Feature*> mesh = Gui::Selection().getObjectsOfType<Mesh::Feature>();
for (std::vector<Mesh::Feature*>::iterator it = mesh.begin(); it != mesh.end(); ++it) {
countPoints += (*it)->Mesh.getValue().countPoints();
countFacets += (*it)->Mesh.getValue().countFacets();
bbox.Add((*it)->Mesh.getBoundingBox());
for (auto it : mesh) {
countPoints += it->Mesh.getValue().countPoints();
countFacets += it->Mesh.getValue().countFacets();
bbox.Add(it->Mesh.getBoundingBox());
}
if (countPoints > 0) {