RecyclableLongList fixes to LastBlockWithData calculations. README.md updated.
This commit is contained in:
1 parent
00a7018893
commit
2157d8b6ac
2 files changed
+76
-44
No files matched your search
@@ -940,10 +940,6 @@ namespace Recyclable.Collections
|
||||
if (_nextItemIndex > 0)
|
||||
{
|
||||
_nextItemIndex--;
|
||||
if (_nextItemIndex == 0)
|
||||
{
|
||||
_lastBlockWithData--;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -951,6 +947,11 @@ namespace Recyclable.Collections
|
||||
_nextItemBlockIndex--;
|
||||
}
|
||||
|
||||
if (_nextItemIndex == 0)
|
||||
{
|
||||
_lastBlockWithData--;
|
||||
}
|
||||
|
||||
if (NeedsClearing)
|
||||
{
|
||||
#pragma warning disable CS8601 // In real use cases we'll never access it
|
||||
@@ -1004,13 +1005,10 @@ namespace Recyclable.Collections
|
||||
CopyItems(this, index);
|
||||
}
|
||||
|
||||
|
||||
if (_nextItemIndex > 0)
|
||||
{
|
||||
_nextItemIndex--;
|
||||
if (_nextItemIndex == 0)
|
||||
{
|
||||
_lastBlockWithData--;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1018,6 +1016,11 @@ namespace Recyclable.Collections
|
||||
_nextItemBlockIndex--;
|
||||
}
|
||||
|
||||
if (_nextItemIndex == 0)
|
||||
{
|
||||
_lastBlockWithData--;
|
||||
}
|
||||
|
||||
if (NeedsClearing)
|
||||
{
|
||||
#pragma warning disable CS8601 // In real use cases we'll never access it
|
||||
@@ -1044,10 +1047,6 @@ namespace Recyclable.Collections
|
||||
if (_nextItemIndex > 0)
|
||||
{
|
||||
_nextItemIndex--;
|
||||
if (_nextItemIndex == 0)
|
||||
{
|
||||
_lastBlockWithData--;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1055,6 +1054,11 @@ namespace Recyclable.Collections
|
||||
_nextItemBlockIndex--;
|
||||
}
|
||||
|
||||
if (_nextItemIndex == 0)
|
||||
{
|
||||
_lastBlockWithData--;
|
||||
}
|
||||
|
||||
if (NeedsClearing)
|
||||
{
|
||||
#pragma warning disable CS8601 // In real use cases we'll never access it
|
||||
|
||||
Reference in new issue
Block a user