Unnecessary local var removed.

This commit is contained in:
mlemanczyk committed 2023-01-29 21:31:25 +01:00
1 parent 650a63828f
commit b24adc6d93
1 file changed
+2 -3
+2 -3
View File
@@ -231,10 +231,9 @@ namespace Recyclable.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Add(T item)
{
long requiredCapacity = _longCount + 1;
if (_capacity < requiredCapacity)
if (_capacity < _longCount + 1)
{
_ = EnsureCapacity(requiredCapacity);
_ = EnsureCapacity(_longCount + 1);
}
_memoryBlocks[_lastBlockIndex][_lastItemIndex++] = item;