diff --git a/src/sim/init.cc b/src/sim/init.cc index f9ab8b2997..634c71634b 100644 --- a/src/sim/init.cc +++ b/src/sim/init.cc @@ -143,12 +143,10 @@ EmbeddedPython::initAll() // Load the rest of the embedded python files into the embedded // python importer - std::list::iterator i = getList().begin(); - std::list::iterator end = getList().end(); - for (; i != end; ++i) - if (!(*i)->addModule()) + for (auto *embedded: getList()) { + if (!embedded->addModule()) return 1; - + } return 0; }