Refactor collections to use 'scoped in T' parameters
Updated Add/Remove/Enqueue/Push/etc. methods in core unsafe collections to accept parameters as 'scoped in T' for improved performance and safety. Bumped assembly versions in both csproj files.
This commit is contained in:
@@ -206,7 +206,7 @@ public unsafe struct UnsafeSlotMap<T> : IUnsafeCollection<T>
|
||||
/// <param name="item">The item to add to the collection.</param>
|
||||
/// <param name="generation">When this method returns, contains the Generation number associated with the slot where the item was stored.</param>
|
||||
/// <returns>The index of the slot in which the item was stored.</returns>
|
||||
public int Add(T item, out int generation)
|
||||
public int Add(scoped in T item, out int generation)
|
||||
{
|
||||
if (_freeSlots.Count > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user