Removed unnecessary Span<T> creation in RecyclableList.AddRange(T[] items) & .AddRange(RecyclableArrayList<T> items)
This commit is contained in:
1 parent
1d61684300
commit
8dfdc6f088
1 file changed
+2
-2
@@ -294,7 +294,7 @@ namespace Recyclable.Collections
|
|||||||
}
|
}
|
||||||
|
|
||||||
_nextItemIndex = itemsSpan.Length;
|
_nextItemIndex = itemsSpan.Length;
|
||||||
itemsSpan[..itemsSpan.Length].CopyTo(targetBlockArraySpan);
|
itemsSpan.CopyTo(targetBlockArraySpan);
|
||||||
_longCount = targetCapacity;
|
_longCount = targetCapacity;
|
||||||
_lastBlockIndex = targetBlockIndex;
|
_lastBlockIndex = targetBlockIndex;
|
||||||
}
|
}
|
||||||
@@ -320,7 +320,7 @@ namespace Recyclable.Collections
|
|||||||
}
|
}
|
||||||
|
|
||||||
_nextItemIndex = itemsSpan.Length;
|
_nextItemIndex = itemsSpan.Length;
|
||||||
itemsSpan[..itemsSpan.Length].CopyTo(targetBlockArraySpan);
|
itemsSpan.CopyTo(targetBlockArraySpan);
|
||||||
_longCount = targetCapacity;
|
_longCount = targetCapacity;
|
||||||
_lastBlockIndex = targetBlockIndex;
|
_lastBlockIndex = targetBlockIndex;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user