Performance improvement. Removing unnecessary var.
This commit is contained in:
1 parent
d4440134c8
commit
b9b4c40cf9
1 file changed
+3
-5
@@ -199,15 +199,13 @@ namespace Recyclable.Collections
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int blockSize = _blockSize;
|
memory = SetNewLength(memory, _blockSize, newCapacity);
|
||||||
memory = SetNewLength(memory, blockSize, newCapacity);
|
|
||||||
if (oldCapacity == 0 && newCapacity > 0)
|
if (oldCapacity == 0 && newCapacity > 0)
|
||||||
{
|
{
|
||||||
blockSize = memory[0].Length;
|
_blockSize = memory[0].Length;
|
||||||
_blockSize = blockSize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
newCapacity = memory.Length * blockSize;
|
newCapacity = memory.Length * _blockSize;
|
||||||
_capacity = newCapacity;
|
_capacity = newCapacity;
|
||||||
_memoryBlocks = memory;
|
_memoryBlocks = memory;
|
||||||
return newCapacity;
|
return newCapacity;
|
||||||
|
|||||||
Reference in new issue
Block a user