mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: prefer std::ranges over begin() and end() (#43464)
This commit is contained in:
@@ -38,10 +38,10 @@ void NotificationPresenter::RemoveNotification(Notification* notification) {
|
||||
|
||||
void NotificationPresenter::CloseNotificationWithId(
|
||||
const std::string& notification_id) {
|
||||
auto it = std::find_if(notifications_.begin(), notifications_.end(),
|
||||
[¬ification_id](const Notification* n) {
|
||||
return n->notification_id() == notification_id;
|
||||
});
|
||||
auto it = std::ranges::find_if(
|
||||
notifications_, [¬ification_id](const Notification* n) {
|
||||
return n->notification_id() == notification_id;
|
||||
});
|
||||
if (it != notifications_.end()) {
|
||||
Notification* notification = (*it);
|
||||
notification->Dismiss();
|
||||
|
||||
Reference in New Issue
Block a user