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

Side by Side Diff: webrtc/system_wrappers/source/condition_variable_event_win.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Source: 2 Source:
3 http://www1.cse.wustl.edu/~schmidt/ACE-copying.html 3 http://www1.cse.wustl.edu/~schmidt/ACE-copying.html
4 4
5 License: 5 License:
6 Copyright and Licensing Information for ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), 6 Copyright and Licensing Information for ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM),
7 and CoSMIC(TM) 7 and CoSMIC(TM)
8 8
9 ACE(TM), TAO(TM), CIAO(TM), DAnCE>(TM), and CoSMIC(TM) (henceforth referred to 9 ACE(TM), TAO(TM), CIAO(TM), DAnCE>(TM), and CoSMIC(TM) (henceforth referred to
10 as "DOC software") are copyrighted by Douglas C. Schmidt and his research 10 as "DOC software") are copyrighted by Douglas C. Schmidt and his research
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" 88 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
89 89
90 namespace webrtc { 90 namespace webrtc {
91 91
92 ConditionVariableEventWin::ConditionVariableEventWin() : eventID_(WAKEALL_0) { 92 ConditionVariableEventWin::ConditionVariableEventWin() : eventID_(WAKEALL_0) {
93 memset(&num_waiters_[0], 0, sizeof(num_waiters_)); 93 memset(&num_waiters_[0], 0, sizeof(num_waiters_));
94 94
95 InitializeCriticalSection(&num_waiters_crit_sect_); 95 InitializeCriticalSection(&num_waiters_crit_sect_);
96 96
97 events_[WAKEALL_0] = CreateEvent(NULL, // no security attributes 97 events_[WAKEALL_0] = CreateEvent(nullptr, // no security attributes
98 TRUE, // manual-reset, sticky event 98 TRUE, // manual-reset, sticky event
99 FALSE, // initial state non-signaled 99 FALSE, // initial state non-signaled
100 NULL); // no name for event 100 nullptr); // no name for event
101 101
102 events_[WAKEALL_1] = CreateEvent(NULL, // no security attributes 102 events_[WAKEALL_1] = CreateEvent(nullptr, // no security attributes
103 TRUE, // manual-reset, sticky event 103 TRUE, // manual-reset, sticky event
104 FALSE, // initial state non-signaled 104 FALSE, // initial state non-signaled
105 NULL); // no name for event 105 nullptr); // no name for event
106 106
107 events_[WAKE] = CreateEvent(NULL, // no security attributes 107 events_[WAKE] = CreateEvent(nullptr, // no security attributes
108 FALSE, // auto-reset, sticky event 108 FALSE, // auto-reset, sticky event
109 FALSE, // initial state non-signaled 109 FALSE, // initial state non-signaled
110 NULL); // no name for event 110 nullptr); // no name for event
111 } 111 }
112 112
113 ConditionVariableEventWin::~ConditionVariableEventWin() { 113 ConditionVariableEventWin::~ConditionVariableEventWin() {
114 CloseHandle(events_[WAKE]); 114 CloseHandle(events_[WAKE]);
115 CloseHandle(events_[WAKEALL_1]); 115 CloseHandle(events_[WAKEALL_1]);
116 CloseHandle(events_[WAKEALL_0]); 116 CloseHandle(events_[WAKEALL_0]);
117 117
118 DeleteCriticalSection(&num_waiters_crit_sect_); 118 DeleteCriticalSection(&num_waiters_crit_sect_);
119 } 119 }
120 120
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 const EventWakeUpType eventID = eventID_; 185 const EventWakeUpType eventID = eventID_;
186 const bool have_waiters = num_waiters_[eventID] > 0; 186 const bool have_waiters = num_waiters_[eventID] > 0;
187 LeaveCriticalSection(&num_waiters_crit_sect_); 187 LeaveCriticalSection(&num_waiters_crit_sect_);
188 188
189 if (have_waiters) { 189 if (have_waiters) {
190 SetEvent(events_[eventID]); 190 SetEvent(events_[eventID]);
191 } 191 }
192 } 192 }
193 193
194 } // namespace webrtc 194 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698