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

Unified Diff: tools/gn/header_checker.cc

Issue 2105553005: tools/gn: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 4 years, 5 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/function_get_target_outputs.cc ('k') | tools/gn/input_conversion_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/header_checker.cc
diff --git a/tools/gn/header_checker.cc b/tools/gn/header_checker.cc
index 1002081a8375730a2798b4c33a781a4d95d61aae..5b1564320bd67711376fe5ff6effc27956a03e44 100644
--- a/tools/gn/header_checker.cc
+++ b/tools/gn/header_checker.cc
@@ -129,7 +129,7 @@ HeaderChecker::HeaderChecker(const BuildSettings* build_settings,
const std::vector<const Target*>& targets)
: main_loop_(base::MessageLoop::current()),
build_settings_(build_settings) {
- for (const auto& target : targets)
+ for (auto* target : targets)
AddTargetToFileMap(target, &file_map_);
}
@@ -140,7 +140,7 @@ bool HeaderChecker::Run(const std::vector<const Target*>& to_check,
bool force_check,
std::vector<Err>* errors) {
FileMap files_to_check;
- for (const auto& check : to_check)
+ for (auto* check : to_check)
AddTargetToFileMap(check, &files_to_check);
RunCheckOverFiles(files_to_check, force_check);
@@ -567,9 +567,9 @@ Err HeaderChecker::MakeUnreachableError(
std::string msg = "It is not in any dependency of\n " +
from_target->label().GetUserVisibleName(include_toolchain);
msg += "\nThe include file is in the target(s):\n";
- for (const auto& target : targets_with_matching_toolchains)
+ for (auto* target : targets_with_matching_toolchains)
msg += " " + target->label().GetUserVisibleName(include_toolchain) + "\n";
- for (const auto& target : targets_with_other_toolchains)
+ for (auto* target : targets_with_other_toolchains)
msg += " " + target->label().GetUserVisibleName(include_toolchain) + "\n";
if (targets_with_other_toolchains.size() +
targets_with_matching_toolchains.size() > 1)
« no previous file with comments | « tools/gn/function_get_target_outputs.cc ('k') | tools/gn/input_conversion_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698