refactor: use std::erase()
(#41881)
* refactor: use std::erase() in WebContentsPreferences::~WebContentsPreferences() * refactor: use std::erase() in WindowList::RemoveWindow() * refactor: use std::erase() in ElectronBindings::EnvironmentDestroyed() * refactor: use std::erase() in CleanedUpAtExit::~CleanedUpAtExit() * refactor: use std::erase_if() in ElectronBrowserContext::RevokeDevicePermission() * refactor: use std::erase_if() in UsbChooserController::GotUsbDeviceList() * refactor: move DoesDeviceMatch() out of class into anonymous namespace
This commit is contained in:
parent
39bf441b3b
commit
0346e0a8bf
7 changed files with 74 additions and 91 deletions
|
@ -83,10 +83,7 @@ void ElectronBindings::BindTo(v8::Isolate* isolate,
|
|||
}
|
||||
|
||||
void ElectronBindings::EnvironmentDestroyed(node::Environment* env) {
|
||||
auto it =
|
||||
std::find(pending_next_ticks_.begin(), pending_next_ticks_.end(), env);
|
||||
if (it != pending_next_ticks_.end())
|
||||
pending_next_ticks_.erase(it);
|
||||
std::erase(pending_next_ticks_, env);
|
||||
}
|
||||
|
||||
void ElectronBindings::ActivateUVLoop(v8::Isolate* isolate) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue