mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:07:45 +00:00
AK: Let Array::from_span
take a readonly Span
We are copying here, so there is no need to require a non-const Span.
This commit is contained in:
parent
467bc5b093
commit
8a9761de20
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ struct Array {
|
||||||
using ValueType = T;
|
using ValueType = T;
|
||||||
|
|
||||||
// This is a static function because constructors mess up Array's POD-ness.
|
// This is a static function because constructors mess up Array's POD-ness.
|
||||||
static Array from_span(Span<T> span)
|
static Array from_span(ReadonlySpan<T> span)
|
||||||
{
|
{
|
||||||
Array array;
|
Array array;
|
||||||
VERIFY(span.size() == Size);
|
VERIFY(span.size() == Size);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue