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

Unified Diff: webrtc/modules/video_capture/device_info_impl.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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_capture/device_info_impl.cc
diff --git a/webrtc/modules/video_capture/device_info_impl.cc b/webrtc/modules/video_capture/device_info_impl.cc
index f3eefc8b069c4a0c7c5403dcd42425ad30bd3253..6cadf3e015bd030a15b0709601d534927da81ac7 100644
--- a/webrtc/modules/video_capture/device_info_impl.cc
+++ b/webrtc/modules/video_capture/device_info_impl.cc
@@ -24,10 +24,9 @@ namespace webrtc
namespace videocapturemodule
{
DeviceInfoImpl::DeviceInfoImpl()
- : _apiLock(*RWLockWrapper::CreateRWLock()), _lastUsedDeviceName(NULL),
- _lastUsedDeviceNameLength(0)
-{
-}
+ : _apiLock(*RWLockWrapper::CreateRWLock()),
+ _lastUsedDeviceName(nullptr),
+ _lastUsedDeviceNameLength(0) {}
DeviceInfoImpl::~DeviceInfoImpl(void)
{
@@ -76,22 +75,20 @@ int32_t DeviceInfoImpl::GetCapability(const char* deviceUniqueIdUTF8,
const uint32_t deviceCapabilityNumber,
VideoCaptureCapability& capability)
{
- assert(deviceUniqueIdUTF8 != NULL);
+ assert(deviceUniqueIdUTF8 != nullptr);
- ReadLockScoped cs(_apiLock);
+ ReadLockScoped cs(_apiLock);
- if ((_lastUsedDeviceNameLength != strlen((char*) deviceUniqueIdUTF8))
+ if ((_lastUsedDeviceNameLength != strlen((char*)deviceUniqueIdUTF8))
#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX)
- || (strncasecmp((char*)_lastUsedDeviceName,
- (char*) deviceUniqueIdUTF8,
- _lastUsedDeviceNameLength)!=0))
-#else
- || (_strnicmp((char*) _lastUsedDeviceName,
- (char*) deviceUniqueIdUTF8,
+ || (strncasecmp((char*)_lastUsedDeviceName, (char*)deviceUniqueIdUTF8,
_lastUsedDeviceNameLength) != 0))
+#else
+ || (_strnicmp((char*)_lastUsedDeviceName, (char*)deviceUniqueIdUTF8,
+ _lastUsedDeviceNameLength) != 0))
#endif
- {
+ {
_apiLock.ReleaseLockShared();
_apiLock.AcquireLockExclusive();
if (-1 == CreateCapabilityMap(deviceUniqueIdUTF8))

Powered by Google App Engine
This is Rietveld 408576698