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
commit 470c99a2a6
Notes: sideshowbarker 2024-07-18 04:17:47 +09:00
10 changed files with 11 additions and 11 deletions

View file

@ -27,7 +27,7 @@ public:
HashTable<Cell*> const& values() const { return m_values; };
HashTable<Cell*>& values() { return m_values; };
virtual void remove_swept_cells(Badge<Heap>, Vector<Cell*>&) override;
virtual void remove_swept_cells(Badge<Heap>, Span<Cell*>) override;
private:
HashTable<Cell*> m_values; // This stores Cell pointers instead of Object pointers to aide with sweeping