refactor: run clang-tidy (#20231)
* refactor: clang-tidy modernize-use-nullptr * refactor: clang-tidy modernize-use-equals-default * refactor: clang-tidy modernize-make-unique * refactor: omit nullptr arg from unique_ptr.reset() As per comment by @miniak
This commit is contained in:
parent
660e566201
commit
2b316f3843
93 changed files with 261 additions and 223 deletions
|
@ -62,7 +62,7 @@ DesktopCapturer::DesktopCapturer(v8::Isolate* isolate) {
|
|||
Init(isolate);
|
||||
}
|
||||
|
||||
DesktopCapturer::~DesktopCapturer() {}
|
||||
DesktopCapturer::~DesktopCapturer() = default;
|
||||
|
||||
void DesktopCapturer::StartHandling(bool capture_window,
|
||||
bool capture_screen,
|
||||
|
@ -90,18 +90,18 @@ void DesktopCapturer::StartHandling(bool capture_window,
|
|||
// Initialize the source list.
|
||||
// Apply the new thumbnail size and restart capture.
|
||||
if (capture_window) {
|
||||
window_capturer_.reset(new NativeDesktopMediaList(
|
||||
window_capturer_ = std::make_unique<NativeDesktopMediaList>(
|
||||
content::DesktopMediaID::TYPE_WINDOW,
|
||||
content::desktop_capture::CreateWindowCapturer()));
|
||||
content::desktop_capture::CreateWindowCapturer());
|
||||
window_capturer_->SetThumbnailSize(thumbnail_size);
|
||||
window_capturer_->AddObserver(this);
|
||||
window_capturer_->StartUpdating();
|
||||
}
|
||||
|
||||
if (capture_screen) {
|
||||
screen_capturer_.reset(new NativeDesktopMediaList(
|
||||
screen_capturer_ = std::make_unique<NativeDesktopMediaList>(
|
||||
content::DesktopMediaID::TYPE_SCREEN,
|
||||
content::desktop_capture::CreateScreenCapturer()));
|
||||
content::desktop_capture::CreateScreenCapturer());
|
||||
screen_capturer_->SetThumbnailSize(thumbnail_size);
|
||||
screen_capturer_->AddObserver(this);
|
||||
screen_capturer_->StartUpdating();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue