Assignments converted to spans

This commit is contained in:
mlemanczyk committed 2023-08-05 00:37:25 +02:00
1 parent 7606bc302c
commit 66364ce4f9
1 file changed
+9 -6
+9 -6
View File
@@ -902,8 +902,9 @@ namespace Recyclable.Collections
if (NeedsClearing)
{
// TODO: Can we benefit from Span<T> here?
_memoryBlocks[_nextItemBlockIndex][_nextItemIndex] = default;
#nullable disable
new Span<T>(_memoryBlocks[_nextItemBlockIndex])[_nextItemIndex] = default;
#nullable restore
}
_version++;
@@ -971,8 +972,9 @@ namespace Recyclable.Collections
if (NeedsClearing)
{
// TODO: Can we benefit from Span<T> here?
_memoryBlocks[_nextItemBlockIndex][_nextItemIndex] = default;
#nullable disable
new Span<T>(_memoryBlocks[_nextItemBlockIndex])[_nextItemIndex] = default;
#nullable restore
}
_version++;
@@ -1010,8 +1012,9 @@ namespace Recyclable.Collections
if (NeedsClearing)
{
// TODO: Can we benefit from Span<T> here?
_memoryBlocks[_nextItemBlockIndex][_nextItemIndex] = default;
#nullable disable
new Span<T>(_memoryBlocks[_nextItemBlockIndex])[_nextItemIndex] = default;
#nullable restore
}
_version++;