summaryrefslogtreecommitdiff
path: root/AK/Array.h
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2023-02-05 19:02:54 +0000
committerLinus Groh <mail@linusgroh.de>2023-02-08 19:15:45 +0000
commit63b11030f03e5a0fd06d9c8cfa788da0388096d8 (patch)
tree3ea0fa1e751683b643c71da95b6ecf98a97508cf /AK/Array.h
parent1c92e6ee9d1f686f20f37445150d63ae474b7e9b (diff)
downloadserenity-63b11030f03e5a0fd06d9c8cfa788da0388096d8.zip
Everywhere: Use ReadonlySpan<T> instead of Span<T const>
Diffstat (limited to 'AK/Array.h')
-rw-r--r--AK/Array.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/AK/Array.h b/AK/Array.h
index a12949cad2..26c0a225b5 100644
--- a/AK/Array.h
+++ b/AK/Array.h
@@ -31,7 +31,7 @@ struct Array {
[[nodiscard]] constexpr size_t size() const { return Size; }
- [[nodiscard]] constexpr Span<T const> span() const { return { __data, Size }; }
+ [[nodiscard]] constexpr ReadonlySpan<T> span() const { return { __data, Size }; }
[[nodiscard]] constexpr Span<T> span() { return { __data, Size }; }
[[nodiscard]] constexpr T const& at(size_t index) const
@@ -76,7 +76,7 @@ struct Array {
[[nodiscard]] constexpr ConstIterator end() const { return ConstIterator::end(*this); }
[[nodiscard]] constexpr Iterator end() { return Iterator::end(*this); }
- [[nodiscard]] constexpr operator Span<T const>() const { return span(); }
+ [[nodiscard]] constexpr operator ReadonlySpan<T>() const { return span(); }
[[nodiscard]] constexpr operator Span<T>() { return span(); }
constexpr size_t fill(T const& value)