AK: Add FixedArray::span()

This commit is contained in:
Andreas Kling 2021-07-11 17:38:13 +02:00
parent 7d096a1287
commit 373b8d7cfa
Notes: sideshowbarker 2024-07-18 09:19:30 +09:00

View file

@ -101,6 +101,9 @@ public:
ConstIterator end() const { return ConstIterator::end(*this); } ConstIterator end() const { return ConstIterator::end(*this); }
Iterator end() { return Iterator::end(*this); } Iterator end() { return Iterator::end(*this); }
Span<T const> span() const { return { data(), size() }; }
Span<T> span() { return { data(), size() }; }
private: private:
size_t m_size { 0 }; size_t m_size { 0 };
T* m_elements { nullptr }; T* m_elements { nullptr };