diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-11 12:02:38 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-11 12:09:55 +0200 |
commit | 470c99a2a6ac793d60a044621681420aef91623b (patch) | |
tree | 2c45c48aac6e9da6a2488ed945ee7069c9793a65 /Userland/Libraries/LibJS/Runtime/WeakSet.cpp | |
parent | 9b5696fee7012fc4ff75eed57ee6f77009dcb18c (diff) | |
download | serenity-470c99a2a6ac793d60a044621681420aef91623b.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/WeakSet.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/WeakSet.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/WeakSet.cpp b/Userland/Libraries/LibJS/Runtime/WeakSet.cpp index ebf717ffc6..6d269ea38c 100644 --- a/Userland/Libraries/LibJS/Runtime/WeakSet.cpp +++ b/Userland/Libraries/LibJS/Runtime/WeakSet.cpp @@ -23,7 +23,7 @@ WeakSet::~WeakSet() { } -void WeakSet::remove_swept_cells(Badge<Heap>, Vector<Cell*>& cells) +void WeakSet::remove_swept_cells(Badge<Heap>, Span<Cell*> cells) { for (auto* cell : cells) m_values.remove(cell); |