Assignments converted to spans
This commit is contained in:
1 parent
7606bc302c
commit
66364ce4f9
1 file changed
+9
-6
@@ -902,8 +902,9 @@ namespace Recyclable.Collections
|
|||||||
|
|
||||||
if (NeedsClearing)
|
if (NeedsClearing)
|
||||||
{
|
{
|
||||||
// TODO: Can we benefit from Span<T> here?
|
#nullable disable
|
||||||
_memoryBlocks[_nextItemBlockIndex][_nextItemIndex] = default;
|
new Span<T>(_memoryBlocks[_nextItemBlockIndex])[_nextItemIndex] = default;
|
||||||
|
#nullable restore
|
||||||
}
|
}
|
||||||
|
|
||||||
_version++;
|
_version++;
|
||||||
@@ -971,8 +972,9 @@ namespace Recyclable.Collections
|
|||||||
|
|
||||||
if (NeedsClearing)
|
if (NeedsClearing)
|
||||||
{
|
{
|
||||||
// TODO: Can we benefit from Span<T> here?
|
#nullable disable
|
||||||
_memoryBlocks[_nextItemBlockIndex][_nextItemIndex] = default;
|
new Span<T>(_memoryBlocks[_nextItemBlockIndex])[_nextItemIndex] = default;
|
||||||
|
#nullable restore
|
||||||
}
|
}
|
||||||
|
|
||||||
_version++;
|
_version++;
|
||||||
@@ -1010,8 +1012,9 @@ namespace Recyclable.Collections
|
|||||||
|
|
||||||
if (NeedsClearing)
|
if (NeedsClearing)
|
||||||
{
|
{
|
||||||
// TODO: Can we benefit from Span<T> here?
|
#nullable disable
|
||||||
_memoryBlocks[_nextItemBlockIndex][_nextItemIndex] = default;
|
new Span<T>(_memoryBlocks[_nextItemBlockIndex])[_nextItemIndex] = default;
|
||||||
|
#nullable restore
|
||||||
}
|
}
|
||||||
|
|
||||||
_version++;
|
_version++;
|
||||||
|
|||||||
Reference in new issue
Block a user