mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
Profiler: Use AK::any_of for process filtration
Equivalent to std::ranges::any_of as clang-tidy suggests.
This commit is contained in:
parent
071d72b494
commit
6d14940053
1 changed files with 2 additions and 5 deletions
|
@ -510,11 +510,8 @@ bool Profile::process_filter_contains(pid_t pid, EventSerialNumber serial)
|
|||
if (!has_process_filter())
|
||||
return true;
|
||||
|
||||
for (auto const& process_filter : m_process_filters)
|
||||
if (pid == process_filter.pid && serial >= process_filter.start_valid && serial <= process_filter.end_valid)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return AK::any_of(m_process_filters,
|
||||
[&](auto const& process_filter) { return pid == process_filter.pid && serial >= process_filter.start_valid && serial <= process_filter.end_valid; });
|
||||
}
|
||||
|
||||
void Profile::set_inverted(bool inverted)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue