[Monodevelop-patches-list] r2325 - in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor: . Gui

John Luke <jluke@cfl.rr.com> jluke at mono-cvs.ximian.com
Thu Mar 10 11:57:39 EST 2005


Author: jluke
Date: 2005-03-10 11:57:39 -0500 (Thu, 10 Mar 2005)
New Revision: 2325

Modified:
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
Log:
remove useless ToCharArray methods


Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2005-03-10 07:50:49 UTC (rev 2324)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2005-03-10 16:57:39 UTC (rev 2325)
@@ -1,3 +1,10 @@
+2005-03-10  John Luke  <john.luke at gmail.com>
+
+	* Gui/SourceEditorView.cs:
+	* Gui/SourceEditorDisplayBinding.cs: dont create
+	a char array from the string, it is already indexed
+	that way
+
 2005-03-09  John Luke  <john.luke at gmail.com>
 
 	* Gui/SourceEditorDisplayBinding.cs: only

Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs	2005-03-10 07:50:49 UTC (rev 2324)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs	2005-03-10 16:57:39 UTC (rev 2325)
@@ -429,7 +429,7 @@
 			
 			while (!iter.Equal (start))
 			{
-				char c = iter.Char.ToCharArray ()[0];
+				char c = iter.Char[0];
 				
 				if (c == '\t')
 					col += (tab_size - (col % tab_size));

Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs	2005-03-10 07:50:49 UTC (rev 2324)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs	2005-03-10 16:57:39 UTC (rev 2325)
@@ -548,7 +548,7 @@
 				TextIter start = Buffer.GetIterAtLine (l);
 				TextIter end = start;
 				
-				char c = start.Char.ToCharArray ()[0];
+				char c = start.Char[0];
 				
 				if (c == '\t') {
 					end.ForwardChar ();
@@ -558,7 +558,7 @@
 					int cnt = 0;
 					int max = (int) TabsWidth;
 					
-					while (cnt <= max && end.Char.ToCharArray ()[0] == ' ' && ! end.EndsLine ()) {
+					while (cnt <= max && end.Char[0] == ' ' && ! end.EndsLine ()) {
 						cnt ++;
 						end.ForwardChar ();
 					}
@@ -629,7 +629,7 @@
 		char IFormattableDocument.GetCharAt (int offset)
 		{
 			TextIter it = Buffer.GetIterAtOffset (offset);
-			return it.Char.ToCharArray ()[0];
+			return it.Char[0];
 		}
 		
 		void IFormattableDocument.Insert (int offset, string text)




More information about the Monodevelop-patches-list mailing list