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

Unified Diff: webrtc/base/messagequeue.cc

Issue 2718663005: Replace NULL with nullptr or null in webrtc/base/. (Closed)
Patch Set: Fixing Windows and formatting issues. Created 3 years, 10 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 | « webrtc/base/messagequeue.h ('k') | webrtc/base/messagequeue_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/messagequeue.cc
diff --git a/webrtc/base/messagequeue.cc b/webrtc/base/messagequeue.cc
index 4a30ad17cc2fec1494a50967762118d26ade4912..efe618851a82086c5450dd3096684ee04477ee58 100644
--- a/webrtc/base/messagequeue.cc
+++ b/webrtc/base/messagequeue.cc
@@ -49,7 +49,7 @@ class SCOPED_LOCKABLE DebugNonReentrantCritScope {
//------------------------------------------------------------------
// MessageQueueManager
-MessageQueueManager* MessageQueueManager::instance_ = NULL;
+MessageQueueManager* MessageQueueManager::instance_ = nullptr;
MessageQueueManager* MessageQueueManager::Instance() {
// Note: This is not thread safe, but it is first called before threads are
@@ -60,7 +60,7 @@ MessageQueueManager* MessageQueueManager::Instance() {
}
bool MessageQueueManager::IsInitialized() {
- return instance_ != NULL;
+ return instance_ != nullptr;
}
MessageQueueManager::MessageQueueManager() : locked_(false) {}
@@ -99,7 +99,7 @@ void MessageQueueManager::RemoveInternal(MessageQueue *message_queue) {
destroy = message_queues_.empty();
}
if (destroy) {
- instance_ = NULL;
+ instance_ = nullptr;
delete this;
}
}
@@ -214,11 +214,11 @@ void MessageQueue::DoDestroy() {
// is going away.
SignalQueueDestroyed();
MessageQueueManager::Remove(this);
- Clear(NULL);
+ Clear(nullptr);
SharedScope ss(&ss_lock_);
if (ss_) {
- ss_->SetMessageQueue(NULL);
+ ss_->SetMessageQueue(nullptr);
}
}
@@ -333,7 +333,7 @@ bool MessageQueue::Get(Message *pmsg, int cmsWait, bool process_io) {
}
// If this was a dispose message, delete it and skip it.
if (MQID_DISPOSE == pmsg->message_id) {
- RTC_DCHECK(NULL == pmsg->phandler);
+ RTC_DCHECK(nullptr == pmsg->phandler);
delete pmsg->pdata;
*pmsg = Message();
continue;
« no previous file with comments | « webrtc/base/messagequeue.h ('k') | webrtc/base/messagequeue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698