RecyclableList.BlockCount renamed => RecyclableList.ReservedBlockCount. Fixed to always include the last block.

RecyclableList.LastTakenBlockIndex property added for some scenarios.

RecyclableList.IndexOf & .LongIndexOf fixed to use the correct index.

RecyclableArrayList.AddRange(RecyclableList<T> items) fixed to use the correct index.

Some test cases excluded, where needed.
This commit is contained in:
mlemanczyk committed 2023-03-20 23:46:50 +01:00
1 parent 0a402e2d13
commit b91c4476eb
4 files changed
+27 -12

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ namespace Recyclable.Collections
LongCount--;
if ((List.Capacity * _blockSize) - LongCount == _blockSize)
{
List.RemoveBlock(List.BlockCount - 1);
List.RemoveBlock(List.ReservedBlockCount - 1);
}
return toRemove;