1 From: Lukas Lipka <lukas@pmad.net>
3 Small cleanup for converting a string to a char array
5 --- Lucene.Net/Index/TermBuffer.cs.orig 2005-10-02 10:45:59.000000000 +0100
6 +++ Lucene.Net/Index/TermBuffer.cs 2005-10-02 10:47:06.000000000 +0100
7 @@ -83,13 +83,7 @@ namespace Lucene.Net.Index
9 // copy text into the buffer
10 SetTextLength(term.Text().Length);
12 - System.String sourceString = term.Text();
13 - int sourceEnd = term.Text().Length;
14 - for (int i = 0; i < sourceEnd; i++)
16 - text[i] = (char) sourceString[i];
18 + text = term.Text().ToCharArray();
20 this.field = term.Field();
22 @@ -140,4 +134,4 @@ namespace Lucene.Net.Index
27 \ No newline at end of file