summaryrefslogtreecommitdiff
path: root/Userland/DevTools
diff options
context:
space:
mode:
authorHendiadyoin1 <leon2002.la@gmail.com>2021-12-22 16:51:32 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-23 12:45:36 -0800
commit6d149400534643d2d4549853b257c136c3a8d47c (patch)
tree20f95b645e8f36e3728d9bdca2ae3fdea9396ce5 /Userland/DevTools
parent071d72b49433be1d8d400d0c70b0aae680096638 (diff)
downloadserenity-6d149400534643d2d4549853b257c136c3a8d47c.zip
Profiler: Use AK::any_of for process filtration
Equivalent to std::ranges::any_of as clang-tidy suggests.
Diffstat (limited to 'Userland/DevTools')
-rw-r--r--Userland/DevTools/Profiler/Profile.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Userland/DevTools/Profiler/Profile.cpp b/Userland/DevTools/Profiler/Profile.cpp
index f5acbeb8f7..46349dc859 100644
--- a/Userland/DevTools/Profiler/Profile.cpp
+++ b/Userland/DevTools/Profiler/Profile.cpp
@@ -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)