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 3e09b8ee2d
commit 7cb51a4980
49 changed files with 364 additions and 365 deletions

View File

@@ -399,10 +399,10 @@ PyObject* GeometryPy::getExtensions(PyObject *args)
Py::List list;
for (std::size_t i=0; i<ext.size(); ++i) {
for (const auto & it : ext) {
// const casting only to get the Python object to make a copy
std::shared_ptr<GeometryExtension> p = std::const_pointer_cast<GeometryExtension>(ext[i].lock());
std::shared_ptr<GeometryExtension> p = std::const_pointer_cast<GeometryExtension>(it.lock());
if(p) {
// we create a python copy and add it to the list