refactor: prefer std::ranges over begin() and end() (#43482)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
d55e120038
commit
9a3618e912
11 changed files with 30 additions and 40 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue