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

Unified Diff: webrtc/base/event.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/checks.cc ('k') | webrtc/base/event_tracer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/event.cc
diff --git a/webrtc/base/event.cc b/webrtc/base/event.cc
index 4b348f63a1682585e419bb9518dc3aa8d4f99031..27506b3269f724c3eac4da979a7e12c652355e58 100644
--- a/webrtc/base/event.cc
+++ b/webrtc/base/event.cc
@@ -27,10 +27,9 @@ namespace rtc {
#if defined(WEBRTC_WIN)
Event::Event(bool manual_reset, bool initially_signaled) {
- event_handle_ = ::CreateEvent(NULL, // Security attributes.
- manual_reset,
- initially_signaled,
- NULL); // Name.
+ event_handle_ = ::CreateEvent(nullptr, // Security attributes.
+ manual_reset, initially_signaled,
+ nullptr); // Name.
RTC_CHECK(event_handle_);
}
@@ -56,8 +55,8 @@ bool Event::Wait(int milliseconds) {
Event::Event(bool manual_reset, bool initially_signaled)
: is_manual_reset_(manual_reset),
event_status_(initially_signaled) {
- RTC_CHECK(pthread_mutex_init(&event_mutex_, NULL) == 0);
- RTC_CHECK(pthread_cond_init(&event_cond_, NULL) == 0);
+ RTC_CHECK(pthread_mutex_init(&event_mutex_, nullptr) == 0);
+ RTC_CHECK(pthread_cond_init(&event_cond_, nullptr) == 0);
}
Event::~Event() {
@@ -93,7 +92,7 @@ bool Event::Wait(int milliseconds) {
ts.tv_nsec = (milliseconds % 1000) * 1000000;
#else
struct timeval tv;
- gettimeofday(&tv, NULL);
+ gettimeofday(&tv, nullptr);
ts.tv_sec = tv.tv_sec + (milliseconds / 1000);
ts.tv_nsec = tv.tv_usec * 1000 + (milliseconds % 1000) * 1000000;
« no previous file with comments | « webrtc/base/checks.cc ('k') | webrtc/base/event_tracer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698