mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-17 01:10:28 +03: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
Notes:
sideshowbarker
2024-07-17 06:51:40 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/8a9761de20 Pull-request: https://github.com/SerenityOS/serenity/pull/19902
@ -29,7 +29,7 @@ struct Array {
|
||||
using ValueType = T;
|
||||
|
||||
// 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;
|
||||
VERIFY(span.size() == Size);
|
||||
|
Loading…
Reference in New Issue
Block a user