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

This commit is contained in:
wmayer
2023-08-14 19:40:21 +02:00
committed by wwmayer
parent 4991475341
commit e09d8aaba6
42 changed files with 234 additions and 240 deletions

View File

@@ -269,8 +269,8 @@ PyObject* DocumentPy::mdiViewsOfType(PyObject *args)
PY_TRY {
std::list<Gui::MDIView*> views = getDocumentPtr()->getMDIViewsOfType(type);
Py::List list;
for (auto it = views.begin(); it != views.end(); ++it)
list.append(Py::asObject((*it)->getPyObject()));
for (auto it : views)
list.append(Py::asObject(it->getPyObject()));
return Py::new_reference_to(list);
}
PY_CATCH;