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

Unified Diff: tools/gn/ninja_copy_target_writer.cc

Issue 986113002: tools/gn: Convert for loops to use the new range-based loops in C++11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes Created 5 years, 9 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
Index: tools/gn/ninja_copy_target_writer.cc
diff --git a/tools/gn/ninja_copy_target_writer.cc b/tools/gn/ninja_copy_target_writer.cc
index 9cd1b72771d5f29a3f375c9133c0043e48106dac..b0313bec3f279dc55bc02a7cbaf1f629d2fa57b4 100644
--- a/tools/gn/ninja_copy_target_writer.cc
+++ b/tools/gn/ninja_copy_target_writer.cc
@@ -100,9 +100,7 @@ void NinjaCopyTargetWriter::WriteCopyRules(
// where a command might need to make sure something else runs before it runs
// to avoid conflicts. Such cases should be avoided where possible, but
// sometimes that's not possible.
- for (size_t i = 0; i < target_->sources().size(); i++) {
- const SourceFile& input_file = target_->sources()[i];
-
+ for (const auto& input_file : target_->sources()) {
OutputFile output_file =
SubstitutionWriter::ApplyPatternToSourceAsOutputFile(
target_->settings(), output_subst, input_file);

Powered by Google App Engine
This is Rietveld 408576698