Author: raja
Date: 2007-10-09 10:19:17 -0400 (Tue, 09 Oct 2007)
New Revision: 87165
Modified:
trunk/mcs/class/System/System.Collections.Generic/ChangeLog
trunk/mcs/class/System/System.Collections.Generic/RBTree.cs
Log:
* RBTree.cs (get_Item, do_remove): Remove redundant code.
Modified: trunk/mcs/class/System/System.Collections.Generic/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Collections.Generic/ChangeLog 2007-10-09
14:05:52 UTC (rev 87164)
+++ trunk/mcs/class/System/System.Collections.Generic/ChangeLog 2007-10-09
14:19:17 UTC (rev 87165)
@@ -1,3 +1,7 @@
+2007-10-09 Raja R Harinath <[EMAIL PROTECTED]>
+
+ * RBTree.cs (get_Item, do_remove): Remove redundant code.
+
2007-08-20 Jb Evain <[EMAIL PROTECTED]>
* SortedList.cs: don't crash in ListKeys and ListValues
Modified: trunk/mcs/class/System/System.Collections.Generic/RBTree.cs
===================================================================
--- trunk/mcs/class/System/System.Collections.Generic/RBTree.cs 2007-10-09
14:05:52 UTC (rev 87164)
+++ trunk/mcs/class/System/System.Collections.Generic/RBTree.cs 2007-10-09
14:19:17 UTC (rev 87165)
@@ -231,7 +231,7 @@
throw new IndexOutOfRangeException
("index");
Node current = root;
- while (current.Size > 1) {
+ while (current != null) {
int left_size = current.left == null ?
0 : (int) current.left.Size;
if (index == left_size)
return current;
@@ -242,10 +242,7 @@
current = current.right;
}
}
-
- if (index != 0)
- throw new SystemException ("Internal
Error: index calculation");
- return current;
+ throw new SystemException ("Internal Error:
index calculation");
}
}
@@ -371,9 +368,6 @@
if (curpos != 0 && current.IsBlack)
rebalance_delete (path);
- // no need for a try .. finally, this is only used to
mitigate allocations/gc
- release_path (path);
-
if (root != null && !root.IsBlack)
throw new SystemException ("Internal Error:
root is not black");
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches