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

Side by Side Diff: webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.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 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 20 matching lines...) Expand all
31 #endif 31 #endif
32 } 32 }
33 33
34 UdpSocketManager* UdpSocketManager::StaticInstance( 34 UdpSocketManager* UdpSocketManager::StaticInstance(
35 CountOperation count_operation, 35 CountOperation count_operation,
36 const int32_t id, 36 const int32_t id,
37 uint8_t& numOfWorkThreads) 37 uint8_t& numOfWorkThreads)
38 { 38 {
39 UdpSocketManager* impl = 39 UdpSocketManager* impl =
40 GetStaticInstance<UdpSocketManager>(count_operation); 40 GetStaticInstance<UdpSocketManager>(count_operation);
41 if (count_operation == kAddRef && impl != NULL) { 41 if (count_operation == kAddRef && impl != nullptr) {
42 if (impl->Init(id, numOfWorkThreads)) { 42 if (impl->Init(id, numOfWorkThreads)) {
43 impl->Start(); 43 impl->Start();
44 } 44 }
45 } 45 }
46 return impl; 46 return impl;
47 } 47 }
48 48
49 UdpSocketManager* UdpSocketManager::Create(const int32_t id, 49 UdpSocketManager* UdpSocketManager::Create(const int32_t id,
50 uint8_t& numOfWorkThreads) 50 uint8_t& numOfWorkThreads)
51 { 51 {
52 return UdpSocketManager::StaticInstance(kAddRef, id, numOfWorkThreads); 52 return UdpSocketManager::StaticInstance(kAddRef, id, numOfWorkThreads);
53 } 53 }
54 54
55 void UdpSocketManager::Return() 55 void UdpSocketManager::Return()
56 { 56 {
57 uint8_t numOfWorkThreads = 0; 57 uint8_t numOfWorkThreads = 0;
58 UdpSocketManager::StaticInstance(kRelease, -1, 58 UdpSocketManager::StaticInstance(kRelease, -1,
59 numOfWorkThreads); 59 numOfWorkThreads);
60 } 60 }
61 61
62 UdpSocketManager::UdpSocketManager() : _numOfWorkThreads(0) 62 UdpSocketManager::UdpSocketManager() : _numOfWorkThreads(0)
63 { 63 {
64 } 64 }
65 65
66 uint8_t UdpSocketManager::WorkThreads() const 66 uint8_t UdpSocketManager::WorkThreads() const
67 { 67 {
68 return _numOfWorkThreads; 68 return _numOfWorkThreads;
69 } 69 }
70 70
71 } // namespace test 71 } // namespace test
72 } // namespace webrtc 72 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698