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

Unified Diff: tools/gn/trace.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/target.cc ('k') | tools/gn/xcode_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/trace.cc
diff --git a/tools/gn/trace.cc b/tools/gn/trace.cc
index 13ebf6202c5bfefa96ce4e45f5ba1392ddd99078..2a1b460d56b11e856cbc121186a541b4439c35e7 100644
--- a/tools/gn/trace.cc
+++ b/tools/gn/trace.cc
@@ -70,7 +70,7 @@ void SummarizeParses(std::vector<const TraceItem*>& loads,
out << "File parse times: (time in ms, name)\n";
std::sort(loads.begin(), loads.end(), &DurationGreater);
- for (const auto& load : loads) {
+ for (auto* load : loads) {
out << base::StringPrintf(" %8.2f ", load->delta().InMillisecondsF());
out << load->name() << std::endl;
}
@@ -80,7 +80,7 @@ void SummarizeCoalesced(std::vector<const TraceItem*>& items,
std::ostream& out) {
// Group by file name.
std::map<std::string, Coalesced> coalesced;
- for (const auto& item : items) {
+ for (auto* item : items) {
Coalesced& c = coalesced[item->name()];
c.name_ptr = &item->name();
c.total_duration += item->delta().InMillisecondsF();
@@ -186,7 +186,7 @@ std::string SummarizeTraces() {
std::vector<const TraceItem*> script_execs;
std::vector<const TraceItem*> check_headers;
int headers_checked = 0;
- for (const auto& event : events) {
+ for (auto* event : events) {
switch (event->type()) {
case TraceItem::TRACE_FILE_PARSE:
parses.push_back(event);
@@ -225,7 +225,7 @@ std::string SummarizeTraces() {
// parallel. Just report the total of all of them.
if (!check_headers.empty()) {
double check_headers_time = 0;
- for (const auto& cur : check_headers)
+ for (auto* cur : check_headers)
check_headers_time += cur->delta().InMillisecondsF();
out << "Header check time: (total time in ms, files checked)\n";
« no previous file with comments | « tools/gn/target.cc ('k') | tools/gn/xcode_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698