Tiny cleanup
This commit is contained in:
1 parent
85c92ee17d
commit
2d55e537d0
1 file changed
+5
-4
@@ -980,10 +980,11 @@ namespace Recyclable.Collections
|
|||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public int IndexOf(T item) => _longCount == 0
|
public int IndexOf(T item) => _longCount == 0
|
||||||
? ItemNotFoundIndex
|
? ItemNotFoundIndex
|
||||||
: _longCount <= _blockSize
|
//// Optimization for tiny collections to avoid any vars etc.
|
||||||
? Array.IndexOf(_memoryBlocks[0], item, 0, checked((int)_longCount))
|
: _longCount <= _blockSize
|
||||||
: checked((int)DoIndexOfParallel(item));
|
? Array.IndexOf(_memoryBlocks[0], item, 0, checked((int)_longCount))
|
||||||
|
: checked((int)DoIndexOfParallel(item));
|
||||||
|
|
||||||
public void Insert(int index, T item) => throw new NotSupportedException();
|
public void Insert(int index, T item) => throw new NotSupportedException();
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user