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

Unified Diff: tools/gn/command_refs.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/command_ls.cc ('k') | tools/gn/commands.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_refs.cc
diff --git a/tools/gn/command_refs.cc b/tools/gn/command_refs.cc
index 413a98f89c74d65d84c3c56ce319fa76e90218d3..014d7e8996dc08ec62b598a99fc06b3141a081cc 100644
--- a/tools/gn/command_refs.cc
+++ b/tools/gn/command_refs.cc
@@ -32,7 +32,7 @@ typedef std::multimap<const Target*, const Target*> DepMap;
// Populates the reverse dependency map for the targets in the Setup.
void FillDepMap(Setup* setup, DepMap* dep_map) {
- for (const auto& target : setup->builder()->GetAllResolvedTargets()) {
+ for (auto* target : setup->builder()->GetAllResolvedTargets()) {
for (const auto& dep_pair : target->GetDeps(Target::DEPS_ALL))
dep_map->insert(std::make_pair(dep_pair.ptr, target));
}
@@ -160,7 +160,7 @@ void GetTargetsContainingFile(Setup* setup,
bool all_toolchains,
UniqueVector<const Target*>* matches) {
Label default_toolchain = setup->loader()->default_toolchain_label();
- for (const auto& target : all_targets) {
+ for (auto* target : all_targets) {
if (!all_toolchains) {
// Only check targets in the default toolchain.
if (target->label().GetToolchainLabel() != default_toolchain)
@@ -189,7 +189,7 @@ void GetTargetsReferencingConfig(Setup* setup,
bool all_toolchains,
UniqueVector<const Target*>* matches) {
Label default_toolchain = setup->loader()->default_toolchain_label();
- for (const auto& target : all_targets) {
+ for (auto* target : all_targets) {
if (!all_toolchains) {
// Only check targets in the default toolchain.
if (target->label().GetToolchainLabel() != default_toolchain)
@@ -442,7 +442,7 @@ int RunRefs(const std::vector<std::string>& args) {
GetTargetsContainingFile(setup, all_targets, file, all_toolchains,
&explicit_target_matches);
}
- for (const auto& config : config_matches) {
+ for (auto* config : config_matches) {
GetTargetsReferencingConfig(setup, all_targets, config, all_toolchains,
&explicit_target_matches);
}
« no previous file with comments | « tools/gn/command_ls.cc ('k') | tools/gn/commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698