| 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))
|
|
|