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

Unified Diff: tools/gn/trace.cc

Issue 798333005: tools/gn: Pass clang-modernize -use-nullptr over it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Brett's review - revert some clang-format changes Created 6 years 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/test_with_scope.cc ('k') | tools/gn/value.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 530915137b3e6a822a17844f480da748fff3631e..333d9b8f424ddb7abf584e5d9fc52445c25237bc 100644
--- a/tools/gn/trace.cc
+++ b/tools/gn/trace.cc
@@ -42,10 +42,10 @@ class TraceLog {
DISALLOW_COPY_AND_ASSIGN(TraceLog);
};
-TraceLog* trace_log = NULL;
+TraceLog* trace_log = nullptr;
struct Coalesced {
- Coalesced() : name_ptr(NULL), total_duration(0.0), count(0) {}
+ Coalesced() : name_ptr(nullptr), total_duration(0.0), count(0) {}
const std::string* name_ptr; // Pointer to a string with the name in it.
double total_duration;
@@ -120,8 +120,7 @@ TraceItem::~TraceItem() {
}
ScopedTrace::ScopedTrace(TraceItem::Type t, const std::string& name)
- : item_(NULL),
- done_(false) {
+ : item_(nullptr), done_(false) {
if (trace_log) {
item_ = new TraceItem(t, name, base::PlatformThread::CurrentId());
item_->set_begin(base::TimeTicks::HighResNow());
@@ -129,8 +128,7 @@ ScopedTrace::ScopedTrace(TraceItem::Type t, const std::string& name)
}
ScopedTrace::ScopedTrace(TraceItem::Type t, const Label& label)
- : item_(NULL),
- done_(false) {
+ : item_(nullptr), done_(false) {
if (trace_log) {
item_ = new TraceItem(t, label.GetUserVisibleName(false),
base::PlatformThread::CurrentId());
« no previous file with comments | « tools/gn/test_with_scope.cc ('k') | tools/gn/value.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698