Skip to content

Commit bbb003c

Browse files
committed
Changing variable name for clarity
1 parent 03472f5 commit bbb003c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/NHibernate.Search/Filter/ChainedFilter.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class EnumerableBasedDocIdSetIterator : DocIdSetIterator
9595
{
9696
private readonly IEnumerable<int> items;
9797
private IEnumerator<int> iterator;
98-
private int currentIndex = -1;
98+
private int currentDocId = -1;
9999

100100
public EnumerableBasedDocIdSetIterator(IEnumerable<int> items)
101101
{
@@ -110,26 +110,26 @@ public EnumerableBasedDocIdSetIterator(IEnumerable<int> items)
110110

111111
public override int Advance(int target)
112112
{
113-
if (target < currentIndex)
113+
if (target < currentDocId)
114114
{
115-
throw new ArgumentOutOfRangeException("target", target, "Iterator state past target: " + currentIndex);
115+
throw new ArgumentOutOfRangeException("target", target, "Iterator state past target: " + currentDocId);
116116
}
117117

118118
// Relies on NO_MORE_DOCS being a big number
119-
while (target > currentIndex)
119+
while (target > currentDocId)
120120
{
121121
if (iterator.MoveNext())
122-
currentIndex = iterator.Current;
122+
currentDocId = iterator.Current;
123123
else
124-
currentIndex = NO_MORE_DOCS;
124+
currentDocId = NO_MORE_DOCS;
125125
}
126126

127-
return currentIndex == NO_MORE_DOCS ? NO_MORE_DOCS : iterator.Current;
127+
return currentDocId == NO_MORE_DOCS ? NO_MORE_DOCS : iterator.Current;
128128
}
129129

130130
public override int DocID()
131131
{
132-
if (currentIndex == NO_MORE_DOCS || currentIndex == -1)
132+
if (currentDocId == NO_MORE_DOCS || currentDocId == -1)
133133
{
134134
return NO_MORE_DOCS;
135135
}
@@ -139,12 +139,12 @@ public override int DocID()
139139

140140
public override int NextDoc()
141141
{
142-
if (currentIndex == NO_MORE_DOCS)
142+
if (currentDocId == NO_MORE_DOCS)
143143
{
144144
return NO_MORE_DOCS;
145145
}
146146

147-
return Advance(currentIndex + 1);
147+
return Advance(currentDocId + 1);
148148
}
149149
}
150150
}

0 commit comments

Comments
 (0)