lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [1/3] lucenenet git commit: fix enumerator port to use appropriate logic
Date Wed, 21 Jan 2015 14:47:21 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 5de15ec25 -> 547b69f51


fix enumerator port to use appropriate logic


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/cf5ebe10
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/cf5ebe10
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/cf5ebe10

Branch: refs/heads/master
Commit: cf5ebe106b4f2df91ccc3dcf168e9b36eeaaab6a
Parents: 5de15ec
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Wed Jan 21 05:11:41 2015 -0600
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Wed Jan 21 05:11:41 2015 -0600

----------------------------------------------------------------------
 .../Codecs/MissingOrdRemapper.cs                        | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cf5ebe10/src/Lucene.Net.TestFramework/Codecs/MissingOrdRemapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MissingOrdRemapper.cs b/src/Lucene.Net.TestFramework/Codecs/MissingOrdRemapper.cs
index c610022..87c3afe 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MissingOrdRemapper.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MissingOrdRemapper.cs
@@ -71,22 +71,20 @@ namespace Lucene.Net.Codecs
 
                 public bool MoveNext()
                 {
-                    if (seenEmpty || !@in.MoveNext())
-                    {
-                        return false;
-                    }
-
                     if (!seenEmpty)
                     {
                         seenEmpty = true;
                         current = new BytesRef();
+                        return true;
                     }
-                    else
+
+                    if (@in.MoveNext())
                     {
                         current = @in.Current;
+                        return true;
                     }
 
-                    return true;
+                    return false;
                 }
 
                 public BytesRef Current


Mime
View raw message