mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-26 19:48:01 +02:00
Added additional Span length asserts. Added Reversed to List
This commit is contained in:
parent
078727c4a7
commit
f0a31a0f55
3 changed files with 8 additions and 1 deletions
|
@ -318,6 +318,8 @@ namespace System.Collections
|
|||
}
|
||||
}
|
||||
|
||||
public Span<T>.ReverseEnumerator Reversed => Span<T>(mItems, mSize).Reversed;
|
||||
|
||||
protected virtual T* Alloc(int size)
|
||||
{
|
||||
return Internal.AllocRawArrayUnmarked<T>(size);
|
||||
|
@ -418,7 +420,7 @@ namespace System.Collections
|
|||
Add(item);
|
||||
}
|
||||
|
||||
public Span<T> GetRange(int offset)
|
||||
public Span<T> GetRange(int offset = 0)
|
||||
{
|
||||
Debug.Assert((uint)offset <= (uint)mSize);
|
||||
return .(mItems + offset, mSize - offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue