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

Unified Diff: tools/gn/value.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/trace.cc ('k') | tools/gn/value_extractors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/value.cc
diff --git a/tools/gn/value.cc b/tools/gn/value.cc
index 0c1f461dd85458949e6c63c28aba4c8aeafc2435..f800bf39593a0a341b66194570521425b9003a0c 100644
--- a/tools/gn/value.cc
+++ b/tools/gn/value.cc
@@ -152,10 +152,9 @@ std::string Value::ToString(bool quote_string) const {
return std::string("{ }");
std::string result = "{\n";
- for (Scope::KeyValueMap::const_iterator i = scope_values.begin();
- i != scope_values.end(); ++i) {
- result += " " + i->first.as_string() + " = " +
- i->second.ToString(true) + "\n";
+ for (const auto& pair : scope_values) {
+ result += " " + pair.first.as_string() + " = " +
+ pair.second.ToString(true) + "\n";
}
result += "}";
« no previous file with comments | « tools/gn/trace.cc ('k') | tools/gn/value_extractors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698