Browse Source

Some details fixed, but Queue does not work

svn path=/trunk/mcs/; revision=346
Miguel de Icaza 24 years ago
parent
commit
bfc0820e28

+ 4 - 4
mcs/class/corlib/System.Collections/Queue.cs

@@ -18,7 +18,7 @@ namespace System.Collections {
 		private int head = 0;   // points to the first used slot
 		private int count = 0;
 		private int capacity = 16;
-		private float growFactor = 2.0;
+		private float growFactor = 2.0F;
 		private int modCount = 0;
 
 		public Queue () {
@@ -94,7 +94,7 @@ namespace System.Collections {
 		public virtual object Clone () {
 			Queue newQueue;
 			
-			queue = new Queue (); // FIXME: improve this...
+			newQueue = new Queue (); // FIXME: improve this...
 			
 			newQueue.contents = (object[]) this.contents.clone ();
 			newQueue.head = this.head;
@@ -166,7 +166,7 @@ namespace System.Collections {
 			if (queue == null) {
 				throw new ArgumentNullException ();
 			}
-			return new SyncQueue (s);
+			return new SyncQueue (queue);
 		}
 
 		public virtual object[] ToArray () {
@@ -284,7 +284,7 @@ namespace System.Collections {
 			private int modCount;
 			private int current;
 
-			internal Enumerator (Queue q) {
+			internal QueueEnumerator (Queue q) {
 				queue = q;
 				modCount = q.modCount;
 				current = -1;  // one element before the head

+ 0 - 1
mcs/class/corlib/System.Collections/common.src

@@ -9,6 +9,5 @@ IEnumerable.cs
 IEnumerator.cs
 IHashCodeProvider.cs
 IList.cs
-Queue.cs
 Stack.cs
 SortedList.cs