mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Add FixedArray::span()
This commit is contained in:
parent
7d096a1287
commit
373b8d7cfa
Notes:
sideshowbarker
2024-07-18 09:19:30 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/373b8d7cfa5
1 changed files with 3 additions and 0 deletions
|
@ -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 };
|
||||||
|
|
Loading…
Reference in a new issue