Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/48366 )

Change subject: sim: Use a range based for loop in EmbeddedPython::initAll.
......................................................................

sim: Use a range based for loop in EmbeddedPython::initAll.

Change-Id: I380bed880735a411c6069079b4ae38a9d9080744
---
M src/sim/init.cc
1 file changed, 3 insertions(+), 5 deletions(-)



diff --git a/src/sim/init.cc b/src/sim/init.cc
index 238bf54..b6ba35e 100644
--- a/src/sim/init.cc
+++ b/src/sim/init.cc
@@ -142,12 +142,10 @@

     // Load the rest of the embedded python files into the embedded
     // python importer
-    std::list<EmbeddedPython *>::iterator i = getList().begin();
-    std::list<EmbeddedPython *>::iterator end = getList().end();
-    for (; i != end; ++i)
-        if (!(*i)->addModule())
+    for (auto *embedded: getList()) {
+        if (!embedded->addModule())
             return 1;
-
+    }
     return 0;
 }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48366
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I380bed880735a411c6069079b4ae38a9d9080744
Gerrit-Change-Number: 48366
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to