1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:27:45 +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

@ -8,7 +8,7 @@
#include <AK/Array.h>
static constexpr int constexpr_sum(Span<int const> const span)
static constexpr int constexpr_sum(ReadonlySpan<int> const span)
{
int sum = 0;
for (auto value : span)

View file

@ -102,7 +102,7 @@ TEST_CASE(can_subspan_as_intended)
{
static constexpr u16 buffer[8] { 1, 2, 3, 4, 5, 6, 7, 8 };
constexpr Span<u16 const> span { buffer, 8 };
constexpr ReadonlySpan<u16> span { buffer, 8 };
constexpr auto slice = span.slice(3, 2);
static_assert(slice.size() == 2u);