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

Unified Diff: tools/gn/commands.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_refs.cc ('k') | tools/gn/function_get_target_outputs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/commands.cc
diff --git a/tools/gn/commands.cc b/tools/gn/commands.cc
index 8682d920dfbb7b5deef8114d5525f4f4ba9c4c36..a6466797ac0ccfe738884f7742f201e42b80fcf5 100644
--- a/tools/gn/commands.cc
+++ b/tools/gn/commands.cc
@@ -298,7 +298,7 @@ void PrintTargetsAsLabels(bool indent,
const std::vector<const Target*>& targets) {
// Putting the labels into a set automatically sorts them for us.
std::set<Label> unique_labels;
- for (const auto& target : targets)
+ for (auto* target : targets)
unique_labels.insert(target->label());
// Grab the label of the default toolchain from the first target.
@@ -446,7 +446,7 @@ bool ResolveFromCommandLineInput(
void FilterTargetsByPatterns(const std::vector<const Target*>& input,
const std::vector<LabelPattern>& filter,
std::vector<const Target*>* output) {
- for (const auto& target : input) {
+ for (auto* target : input) {
for (const auto& pattern : filter) {
if (pattern.Matches(target->label())) {
output->push_back(target);
@@ -459,7 +459,7 @@ void FilterTargetsByPatterns(const std::vector<const Target*>& input,
void FilterTargetsByPatterns(const std::vector<const Target*>& input,
const std::vector<LabelPattern>& filter,
UniqueVector<const Target*>* output) {
- for (const auto& target : input) {
+ for (auto* target : input) {
for (const auto& pattern : filter) {
if (pattern.Matches(target->label())) {
output->push_back(target);
« no previous file with comments | « tools/gn/command_refs.cc ('k') | tools/gn/function_get_target_outputs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698