Tiny cleanup & readability improvement
This commit is contained in:
1 parent
b24adc6d93
commit
7f90fcc969
1 file changed
+2
-2
@@ -242,7 +242,7 @@ namespace Recyclable.Collections
|
|||||||
_lastBlockIndex++;
|
_lastBlockIndex++;
|
||||||
_lastItemIndex = 0;
|
_lastItemIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_longCount++;
|
_longCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,7 +260,7 @@ namespace Recyclable.Collections
|
|||||||
int targetItemIdx = (int)(oldLongCount % blockSize);
|
int targetItemIdx = (int)(oldLongCount % blockSize);
|
||||||
int targetBlockIdx = (int)(oldLongCount / blockSize) + (targetItemIdx > 0 ? 1 : 0);
|
int targetBlockIdx = (int)(oldLongCount / blockSize) + (targetItemIdx > 0 ? 1 : 0);
|
||||||
var memoryBlocksSpan = new Span<T[]>(_memoryBlocks);
|
var memoryBlocksSpan = new Span<T[]>(_memoryBlocks);
|
||||||
var memoryBlocksCount = memoryBlocksSpan.Length;
|
int memoryBlocksCount = memoryBlocksSpan.Length;
|
||||||
var targetBlockSpan = new Span<T>(memoryBlocksSpan[targetBlockIdx]);
|
var targetBlockSpan = new Span<T>(memoryBlocksSpan[targetBlockIdx]);
|
||||||
for (var i = 0L; i < sourceItemsCount; i++)
|
for (var i = 0L; i < sourceItemsCount; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user