1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 20:57:44 +00:00

Everywhere: Use ReadonlySpan<T> instead of Span<T const>

This commit is contained in:
MacDue 2023-02-05 19:02:54 +00:00 committed by Linus Groh
parent 1c92e6ee9d
commit 63b11030f0
102 changed files with 206 additions and 206 deletions

View file

@ -90,7 +90,7 @@ public:
m_size = other.size();
}
explicit Vector(Span<T const> other)
explicit Vector(ReadonlySpan<T> other)
requires(!IsLvalueReference<T>)
{
ensure_capacity(other.size());
@ -112,10 +112,10 @@ public:
}
Span<StorageType> span() { return { data(), size() }; }
Span<StorageType const> span() const { return { data(), size() }; }
ReadonlySpan<StorageType> span() const { return { data(), size() }; }
operator Span<StorageType>() { return span(); }
operator Span<StorageType const>() const { return span(); }
operator ReadonlySpan<StorageType>() const { return span(); }
bool is_empty() const { return size() == 0; }
ALWAYS_INLINE size_t size() const { return m_size; }