Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(770)

Unified Diff: tools/gn/setup.cc

Issue 610293003: Replace more for loops in GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/scope.cc ('k') | tools/gn/standard_out.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/setup.cc
diff --git a/tools/gn/setup.cc b/tools/gn/setup.cc
index fa9ecf6694167d4da6eff104b728fe25da8440b9..fdbf0f24798f4d417e203d8e0b4d094df05c3134 100644
--- a/tools/gn/setup.cc
+++ b/tools/gn/setup.cc
@@ -351,12 +351,9 @@ bool Setup::FillArgsFromArgsInputFile() {
bool Setup::SaveArgsToFile() {
ScopedTrace setup_trace(TraceItem::TRACE_SETUP, "Save args file");
- Scope::KeyValueMap args = build_settings_.build_args().GetAllOverrides();
-
std::ostringstream stream;
- for (Scope::KeyValueMap::const_iterator i = args.begin();
- i != args.end(); ++i) {
- stream << i->first.as_string() << " = " << i->second.ToString(true);
+ for (const auto& pair : build_settings_.build_args().GetAllOverrides()) {
+ stream << pair.first.as_string() << " = " << pair.second.ToString(true);
stream << std::endl;
}
« no previous file with comments | « tools/gn/scope.cc ('k') | tools/gn/standard_out.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698