1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 12:37:44 +00:00

AK+LibGUI: Pass predicate to *_matching() methods by const reference

This commit is contained in:
Vitaly Dyachkov 2022-04-12 19:21:05 +02:00 committed by Linus Groh
parent 6ed2ded77c
commit a0a4d169f4
5 changed files with 12 additions and 12 deletions

View file

@ -10,9 +10,9 @@
namespace GUI {
void ModelSelection::remove_all_matching(Function<bool(ModelIndex const&)> filter)
void ModelSelection::remove_all_matching(Function<bool(ModelIndex const&)> const& filter)
{
if (m_indices.remove_all_matching([&](ModelIndex const& index) { return filter(index); }))
if (m_indices.remove_all_matching(filter))
notify_selection_changed();
}