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

LibJS: Tweak the WeakContainer::remove_swept_cells() API a little bit

Make this API take a Span<Cell*> instead of a Vector<Cell*>&.
This is behavior neutral, but stops the API looking like it wants to
do mutable things to the Vector.
This commit is contained in:
Andreas Kling 2021-09-11 12:02:38 +02:00
parent 9b5696fee7
commit 470c99a2a6
10 changed files with 11 additions and 11 deletions

View file

@ -251,7 +251,7 @@ void Heap::sweep_dead_cells(bool print_report, const Core::ElapsedTimer& measure
}
for (auto& weak_container : m_weak_containers)
weak_container.remove_swept_cells({}, swept_cells);
weak_container.remove_swept_cells({}, swept_cells.span());
if constexpr (HEAP_DEBUG) {
for_each_block([&](auto& block) {