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

Side by Side Diff: webrtc/base/sigslot.h

Issue 2718663005: Replace NULL with nullptr or null in webrtc/base/. (Closed)
Patch Set: Fixing Windows and formatting issues. Created 3 years, 9 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
« no previous file with comments | « webrtc/base/signalthread_unittest.cc ('k') | webrtc/base/sigslot_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // sigslot.h: Signal/Slot classes 1 // sigslot.h: Signal/Slot classes
2 // 2 //
3 // Written by Sarah Thompson (sarah@telergy.com) 2002. 3 // Written by Sarah Thompson (sarah@telergy.com) 2002.
4 // 4 //
5 // License: Public domain. You are free to use this code however you like, with the proviso that 5 // License: Public domain. You are free to use this code however you like, with the proviso that
6 // the author takes on no responsibility or liability for any use. 6 // the author takes on no responsibility or liability for any use.
7 // 7 //
8 // QUICK DOCUMENTATION 8 // QUICK DOCUMENTATION
9 // 9 //
10 // (see also the full documentation at http://sigsl ot.sourceforge.net/) 10 // (see also the full documentation at http://sigsl ot.sourceforge.net/)
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 pthread_mutex_unlock(get_mutex()); 209 pthread_mutex_unlock(get_mutex());
210 } 210 }
211 211
212 private: 212 private:
213 static pthread_mutex_t* get_mutex(); 213 static pthread_mutex_t* get_mutex();
214 }; 214 };
215 215
216 class multi_threaded_local 216 class multi_threaded_local
217 { 217 {
218 public: 218 public:
219 » » multi_threaded_local() 219 » » multi_threaded_local() { pthread_mutex_init(&m_mutex, nullptr); }
220 » » { 220 » » multi_threaded_local(const multi_threaded_local&) {
221 » » » pthread_mutex_init(&m_mutex, NULL); 221 » » » pthread_mutex_init(&m_mutex, nullptr);
222 » » }
223 » » multi_threaded_local(const multi_threaded_local&)
224 » » {
225 » » » pthread_mutex_init(&m_mutex, NULL);
226 } 222 }
227 ~multi_threaded_local() 223 ~multi_threaded_local()
228 { 224 {
229 pthread_mutex_destroy(&m_mutex); 225 pthread_mutex_destroy(&m_mutex);
230 } 226 }
231 void lock() 227 void lock()
232 { 228 {
233 pthread_mutex_lock(&m_mutex); 229 pthread_mutex_lock(&m_mutex);
234 } 230 }
235 void unlock() 231 void unlock()
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 651
656 template<typename A1, typename A2, typename A3, typename A4, typename A5 , typename A6, typename A7, typename mt_policy = SIGSLOT_DEFAULT_MT_POLICY> 652 template<typename A1, typename A2, typename A3, typename A4, typename A5 , typename A6, typename A7, typename mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
657 using signal7 = signal_with_thread_policy<mt_policy, A1, A2, A3, A4, A5, A6, A7>; 653 using signal7 = signal_with_thread_policy<mt_policy, A1, A2, A3, A4, A5, A6, A7>;
658 654
659 template<typename A1, typename A2, typename A3, typename A4, typename A5 , typename A6, typename A7, typename A8, typename mt_policy = SIGSLOT_DEFAULT_MT _POLICY> 655 template<typename A1, typename A2, typename A3, typename A4, typename A5 , typename A6, typename A7, typename A8, typename mt_policy = SIGSLOT_DEFAULT_MT _POLICY>
660 using signal8 = signal_with_thread_policy<mt_policy, A1, A2, A3, A4, A5, A6, A7, A8>; 656 using signal8 = signal_with_thread_policy<mt_policy, A1, A2, A3, A4, A5, A6, A7, A8>;
661 657
662 } // namespace sigslot 658 } // namespace sigslot
663 659
664 #endif // WEBRTC_BASE_SIGSLOT_H__ 660 #endif // WEBRTC_BASE_SIGSLOT_H__
OLDNEW
« no previous file with comments | « webrtc/base/signalthread_unittest.cc ('k') | webrtc/base/sigslot_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698