LibWeb: Simplify TaskQueue::has_rendering_tasks()

No functional changes.
This commit is contained in:
Jelle Raaijmakers
2026-03-22 12:31:49 +01:00
committed by Andreas Kling
parent 35bd0b4b65
commit eb293197f7
Notes: github-actions[bot] 2026-03-22 19:28:06 +00:00

View File

@@ -111,11 +111,7 @@ Task const* TaskQueue::last_added_task() const
bool TaskQueue::has_rendering_tasks() const
{
for (auto const& task : m_tasks) {
if (task->source() == Task::Source::Rendering)
return true;
}
return false;
return m_tasks.contains([](auto const& task) { return task->source() == Task::Source::Rendering; });
}
}