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:
2026-05-02 13:52:45 +09:00
parent eb01e557d5
commit d6b4074281
9 changed files with 14 additions and 14 deletions

View File

@@ -158,7 +158,7 @@ public unsafe struct UnsafeSparseSet<T> : IUnsafeCollection<T>
/// <param name="value">The value to add to the sparse set.</param>
/// <param name="generation">Outputs the Generation number associated with the added value.</param>
/// <returns>A unique sparse index that can be used to reference this value.</returns>
public int Add(T value, out int generation)
public int Add(scoped in T value, out int generation)
{
if (!_freeSparse.TryPop(out var sparseIndex))
{