[Mono-list] Queue.cs now compiles

Nick Drochak ndrochak@gol.com
Sun, 4 Nov 2001 23:53:46 +0900


Hi all,

I fixed Queue.cs so that it compile correctly.  There were just a couple
of small "syntax" errors that needed massaging.

I also removed the exclude from the build file so Queue.cs gets compiled
along with everything else currently in corlib.

If this class was removed for some other reason, please let me know and
I'll try to help fix whatever the problem was.

See the diff below for the fix I made.

Regards,
Nick D.


Index: Queue.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.Collections/Queue.cs,v
retrieving revision 1.2
diff -u -r1.2 Queue.cs
--- Queue.cs    2001/07/31 00:59:58     1.2
+++ Queue.cs    2001/11/04 10:54:00
@@ -96,7 +96,7 @@

                        newQueue = new Queue (); // FIXME: improve
this...

-                       newQueue.contents = (object[])
this.contents.clone ();
+                       newQueue.contents = (object[])
this.contents.Clone ();
                        newQueue.head = this.head;
                        newQueue.count = this.count;
                        newQueue.capacity = this.capacity;
@@ -179,7 +179,7 @@

                private void grow () {
                        int newCapacity = capacity * 2;
-                       int newContents = new object[newCapacity];
+                       object[] newContents = new object[newCapacity];
                        CopyTo (newContents, 0);
                        contents = newContents;
                        head = 0;