mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Simplify TaskQueue::has_rendering_tasks()
No functional changes.
This commit is contained in:
committed by
Andreas Kling
parent
35bd0b4b65
commit
eb293197f7
Notes:
github-actions[bot]
2026-03-22 19:28:06 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/eb293197f72 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8570
@@ -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; });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user