mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-21 17:28:00 +02:00
Move assert
Place the assert before the allocation.
This commit is contained in:
parent
96c53d4a9e
commit
97501eacee
1 changed files with 1 additions and 1 deletions
|
@ -51,8 +51,8 @@ namespace System.Collections.Generic
|
||||||
[AllowAppend]
|
[AllowAppend]
|
||||||
public this(int capacity)
|
public this(int capacity)
|
||||||
{
|
{
|
||||||
|
Debug.Assert((uint)capacity <= (uint)SizeFlags);
|
||||||
T* items = append T[capacity]* (?);
|
T* items = append T[capacity]* (?);
|
||||||
Debug.Assert(capacity >= 0);
|
|
||||||
mItems = items;
|
mItems = items;
|
||||||
mHead = 0;
|
mHead = 0;
|
||||||
mTail = 0;
|
mTail = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue