Unnecessary local var removed.
This commit is contained in:
1 parent
650a63828f
commit
b24adc6d93
1 file changed
+2
-3
@@ -231,10 +231,9 @@ namespace Recyclable.Collections
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public void Add(T item)
|
public void Add(T item)
|
||||||
{
|
{
|
||||||
long requiredCapacity = _longCount + 1;
|
if (_capacity < _longCount + 1)
|
||||||
if (_capacity < requiredCapacity)
|
|
||||||
{
|
{
|
||||||
_ = EnsureCapacity(requiredCapacity);
|
_ = EnsureCapacity(_longCount + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
_memoryBlocks[_lastBlockIndex][_lastItemIndex++] = item;
|
_memoryBlocks[_lastBlockIndex][_lastItemIndex++] = item;
|
||||||
|
|||||||
Reference in new issue
Block a user