cvsimport
[beagle.git] / beagled / Lucene.Net / upstream-changes / 07_TermBuffer-stringcopy.patch
blob6e8ef3f2826dcf95fa9de10cc4c19c40caf4d6f3
1 From: Lukas Lipka <lukas@pmad.net>
3 Small cleanup for converting a string to a char array
5 Index: Index/TermBuffer.cs
6 ===================================================================
7 RCS file: /cvs/gnome/beagle/beagled/Lucene.Net/Index/TermBuffer.cs,v
8 retrieving revision 1.2.4.5
9 diff -u -3 -p -r1.2.4.5 TermBuffer.cs
10 --- Index/TermBuffer.cs 25 Sep 2006 22:36:29 -0000 1.2.4.5
11 +++ Index/TermBuffer.cs 30 Sep 2006 01:57:11 -0000
12 @@ -85,13 +85,7 @@ namespace Lucene.Net.Index
14 // copy text into the buffer
15 SetTextLength(term.Text().Length);
17 - System.String sourceString = term.Text();
18 - int sourceEnd = term.Text().Length;
19 - for (int i = 0; i < sourceEnd; i++)
20 - {
21 - text[i] = (char) sourceString[i];
22 - }
23 + text = term.Text().ToCharArray();
25 this.field = term.Field();
26 this.term = term;
27 @@ -142,4 +136,4 @@ namespace Lucene.Net.Index
28 return clone;
32 \ No newline at end of file