mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 17:08:00 +02:00
Corlib fixes
This commit is contained in:
parent
dce27867d3
commit
a955361f6a
2 changed files with 8 additions and 1 deletions
|
@ -289,7 +289,7 @@ namespace System.Collections
|
|||
/// Adds an item to the back of the list.
|
||||
public void Add(Span<T> addSpan)
|
||||
{
|
||||
if (mSize == AllocSize)
|
||||
if (mSize + addSpan.Length > AllocSize)
|
||||
{
|
||||
let oldPtr = EnsureCapacity(mSize + addSpan.Length, false);
|
||||
for (var val in ref addSpan)
|
||||
|
|
|
@ -184,6 +184,13 @@ namespace System
|
|||
return Enumerator(this);
|
||||
}
|
||||
|
||||
public override void ToString(String strBuffer)
|
||||
{
|
||||
strBuffer.Append("(");
|
||||
typeof(T).GetFullName(strBuffer);
|
||||
strBuffer.AppendF("*)0x{0:A}[{1}]", (uint)(void*)mPtr, mLength);
|
||||
}
|
||||
|
||||
public struct Enumerator : IEnumerator<T>, IRefEnumerator<T*>
|
||||
{
|
||||
private Span<T> mList;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue