Add SparseSet Test

This commit is contained in:
2025-12-13 18:26:59 +09:00
parent c882c75760
commit a5df2c9637
12 changed files with 179 additions and 102 deletions

View File

@@ -54,7 +54,7 @@ public unsafe struct UnsafeSlotMap<T> : IUnsafeCollection<T>
public Enumerator(UnsafeSlotMap<T>* collection)
{
_collection = collection;
_currentIndex = -1;
_currentIndex = 0;
}
public bool MoveNext()
@@ -65,7 +65,7 @@ public unsafe struct UnsafeSlotMap<T> : IUnsafeCollection<T>
public void Reset()
{
_currentIndex = -1;
_currentIndex = 0;
}
public void Dispose()
@@ -302,11 +302,13 @@ public unsafe struct UnsafeSlotMap<T> : IUnsafeCollection<T>
_validBits.ClearAll();
_count = 0;
Add(default, out _);
}
public readonly void* GetUnsafePtr()
{
return _data.GetUnsafePtr();
return (T*)_data.GetUnsafePtr() + 1;
}
public void Dispose()