From b24adc6d93f03d3ef35b4d6d32d03f59d75d45fa Mon Sep 17 00:00:00 2001 From: mlemanczyk Date: Sun, 29 Jan 2023 21:31:25 +0100 Subject: [PATCH] Unnecessary local var removed. --- Recyclable.Collections/RecyclableList.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Recyclable.Collections/RecyclableList.cs b/Recyclable.Collections/RecyclableList.cs index 8a34ca5..ff4ee94 100644 --- a/Recyclable.Collections/RecyclableList.cs +++ b/Recyclable.Collections/RecyclableList.cs @@ -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;