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

Merge pull request #299 from damianday/QueueFixes

Minor updates to Queue
This commit is contained in:
Brian Fiete 2020-05-26 13:39:27 -07:00 committed by GitHub
commit 3c4a319250
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,6 @@ namespace System.Collections
{ {
Debug.Assert((uint)capacity <= (uint)SizeFlags); Debug.Assert((uint)capacity <= (uint)SizeFlags);
T* items = append T[capacity]* (?); T* items = append T[capacity]* (?);
mItems = items;
mHead = 0; mHead = 0;
mTail = 0; mTail = 0;
mSize = 0; mSize = 0;
@ -123,12 +122,12 @@ namespace System.Collections
get { return mSize; } get { return mSize; }
} }
protected T* Alloc(int size) protected virtual T* Alloc(int size)
{ {
return Internal.AllocRawArrayUnmarked<T>(size); return Internal.AllocRawArrayUnmarked<T>(size);
} }
protected void Free(T* val) protected virtual void Free(T* val)
{ {
delete (void*)val; delete (void*)val;
} }