lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r516735 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs
Date Sat, 10 Mar 2007 15:54:50 GMT
Author: aroush
Date: Sat Mar 10 07:54:50 2007
New Revision: 516735

URL: http://svn.apache.org/viewvc?view=rev&rev=516735
Log:
Avoid boxing/un-boxing variable when storing in a map.

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?view=diff&rev=516735&r1=516734&r2=516735
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs Sat Mar 10 07:54:50
2007
@@ -430,7 +430,7 @@
             byte[] ones = new byte[size];
             byte val = DefaultSimilarity.EncodeNorm(1.0f);
             for (int index = 0; index < size; index++)
-                ones.SetValue(val, index);
+                ones[index] = val;
 
             return ones;
         }



Mime
View raw message