Update source files for bracket style

This commit is contained in:
Marshall Greenblatt
2023-01-02 17:59:03 -05:00
parent d84b07a5cb
commit 3af3eab3e4
366 changed files with 7275 additions and 3834 deletions

View File

@@ -18,8 +18,9 @@ namespace {
const blink::MediaStreamDevice* FindDefaultDeviceWithId(
const blink::MediaStreamDevices& devices,
const std::string& device_id) {
if (devices.empty())
if (devices.empty()) {
return nullptr;
}
blink::MediaStreamDevices::const_iterator iter = devices.begin();
for (; iter != devices.end(); ++iter) {
@@ -82,15 +83,17 @@ void CefMediaCaptureDevicesDispatcher::GetRequestedDevice(
const blink::MediaStreamDevices& audio_devices = GetAudioCaptureDevices();
const blink::MediaStreamDevice* const device =
FindDefaultDeviceWithId(audio_devices, requested_device_id);
if (device)
if (device) {
devices->push_back(*device);
}
}
if (video) {
const blink::MediaStreamDevices& video_devices = GetVideoCaptureDevices();
const blink::MediaStreamDevice* const device =
FindDefaultDeviceWithId(video_devices, requested_device_id);
if (device)
if (device) {
devices->push_back(*device);
}
}
}