From 373b8d7cfa5cc08203a884fdd2026221f76c49b5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 11 Jul 2021 17:38:13 +0200 Subject: AK: Add FixedArray::span() --- AK/FixedArray.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'AK/FixedArray.h') diff --git a/AK/FixedArray.h b/AK/FixedArray.h index ddcbc6c47a..b32ccd2e84 100644 --- a/AK/FixedArray.h +++ b/AK/FixedArray.h @@ -101,6 +101,9 @@ public: ConstIterator end() const { return ConstIterator::end(*this); } Iterator end() { return Iterator::end(*this); } + Span span() const { return { data(), size() }; } + Span span() { return { data(), size() }; } + private: size_t m_size { 0 }; T* m_elements { nullptr }; -- cgit v1.2.3