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

This commit is contained in:
wmayer
2023-08-15 17:28:50 +02:00
committed by Chris Hennes
parent 9a1f8a11d6
commit 312975edba
49 changed files with 364 additions and 365 deletions

View File

@@ -2124,10 +2124,10 @@ private:
tEdgeClusterVector aclusteroutput = acluster.GetClusters();
Py::List root_list;
for (tEdgeClusterVector::iterator it=aclusteroutput.begin(); it != aclusteroutput.end();++it) {
for (const auto & it : aclusteroutput) {
Py::List add_list;
for (tEdgeVector::iterator it1=(*it).begin();it1 != (*it).end();++it1) {
add_list.append(Py::Object(new TopoShapeEdgePy(new TopoShape(*it1)),true));
for (const auto& it1 : it) {
add_list.append(Py::Object(new TopoShapeEdgePy(new TopoShape(it1)),true));
}
root_list.append(add_list);
}
@@ -2160,8 +2160,8 @@ private:
std::list<TopoDS_Edge> sorted = sort_Edges(Precision::Confusion(), edges);
Py::List sorted_list;
for (std::list<TopoDS_Edge>::iterator it = sorted.begin(); it != sorted.end(); ++it) {
sorted_list.append(Py::Object(new TopoShapeEdgePy(new TopoShape(*it)),true));
for (const auto & it : sorted) {
sorted_list.append(Py::Object(new TopoShapeEdgePy(new TopoShape(it)),true));
}
return sorted_list;
@@ -2195,8 +2195,8 @@ private:
while(!edges.empty()) {
std::list<TopoDS_Edge> sorted = sort_Edges(tol3d, edges);
Py::List sorted_list;
for (std::list<TopoDS_Edge>::iterator it = sorted.begin(); it != sorted.end(); ++it) {
sorted_list.append(Py::Object(new TopoShapeEdgePy(new TopoShape(*it)),true));
for (const auto & it : sorted) {
sorted_list.append(Py::Object(new TopoShapeEdgePy(new TopoShape(it)),true));
}
root_list.append(sorted_list);
}