1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-25 02:58:02 +02:00

Added additional Span length asserts. Added Reversed to List

This commit is contained in:
Brian Fiete 2023-10-15 07:56:44 -07:00
parent 078727c4a7
commit f0a31a0f55
3 changed files with 8 additions and 1 deletions

View file

@ -23,6 +23,7 @@ namespace System
}
mPtr = &array.[Friend]GetRef(0);
mLength = array.[Friend]mLength;
Debug.Assert(mLength >= 0);
}
public this(T[] array, int index)
@ -35,10 +36,12 @@ namespace System
}
mPtr = &array[index];
mLength = array.[Friend]mLength - index;
Debug.Assert(mLength >= 0);
}
public this(T[] array, int index, int length)
{
Debug.Assert(length >= 0);
if (array == null)
{
Debug.Assert(index == 0 && length == 0);
@ -54,6 +57,7 @@ namespace System
public this(T* memory, int length)
{
Debug.Assert(length >= 0);
mPtr = memory;
mLength = length;
}