Gabe Black has submitted this change. ( 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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48366
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
---
M src/sim/init.cc
1 file changed, 3 insertions(+), 5 deletions(-)

Approvals:
  Daniel Carvalho: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/sim/init.cc b/src/sim/init.cc
index f9ab8b2..634c716 100644
--- a/src/sim/init.cc
+++ b/src/sim/init.cc
@@ -143,12 +143,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;
 }




1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
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: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
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