lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r418838 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs
Date Mon, 03 Jul 2006 20:18:55 GMT
Author: aroush
Date: Mon Jul  3 13:18:54 2006
New Revision: 418838

URL: http://svn.apache.org/viewvc?rev=418838&view=rev
Log:
Was returning the wrong data member

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/SegmentReader.cs?rev=418838&r1=418837&r2=418838&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs Mon Jul  3 13:18:54
2006
@@ -515,15 +515,12 @@
 		
 		internal static byte[] CreateFakeNorms(int size)
 		{
-			byte[] ones = new byte[size];
-            byte[] byteArray = new byte[ones.Length];
-            for (int index = 0; index < ones.Length; index++)
-                byteArray[index] = (byte) ones[index];
+            byte[] ones = new byte[size];
             byte val = DefaultSimilarity.EncodeNorm(1.0f);
-            for (int index = 0; index < byteArray.Length; index++)
-                byteArray.SetValue(val, index);
+            for (int index = 0; index < size; index++)
+                ones.SetValue(val, index);
 
-			return ones;
+            return ones;
 		}
 		
 		private byte[] ones;



Mime
View raw message