Fixed an ugly bug in the IndexOf() method; achieved 100% test coverage for the deque code so far
git-svn-id: file:///srv/devel/repo-conversion/nusu@162 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
7885e86836
commit
a817f52406
2 changed files with 73 additions and 4 deletions
|
|
@ -110,7 +110,7 @@ namespace Nuclex.Support.Collections {
|
|||
int lastBlock = this.blocks.Count - 1;
|
||||
for(int tempIndex = 1; tempIndex < lastBlock; ++tempIndex) {
|
||||
index = Array.IndexOf<ItemType>(
|
||||
this.blocks[1], item, 0, this.blockSize
|
||||
this.blocks[tempIndex], item, 0, this.blockSize
|
||||
);
|
||||
if(index != -1) {
|
||||
return (index - this.firstBlockStartIndex + tempIndex * this.blockSize);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue