*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 20 Feb 2006 22:30:04 +0100
changeset 9162 2052a4f34093
parent 9161 1ad4d98f8f62
child 9163 d0c5efd22a36
*** empty log message ***
SequenceableCollection.st
--- a/SequenceableCollection.st	Mon Feb 20 22:29:35 2006 +0100
+++ b/SequenceableCollection.st	Mon Feb 20 22:30:04 2006 +0100
@@ -194,11 +194,7 @@
      in that #new: creates an empty collection with preallocated size,
      while #withSize: creates a non empty one."
 
-    |newCollection|
-
-    newCollection := self new:size.
-    newCollection grow:size.
-    ^ newCollection
+    ^ (self new:size) grow:size.
 
     "
      (OrderedCollection new:10) inspect.
@@ -1860,7 +1856,7 @@
     |newColl sz|
 
     sz := self size.
-    newColl := (StringCollection new:sz) grow:sz.
+    newColl := StringCollection withSize:sz.
     newColl replaceFrom:1 to:sz with:self startingAt:1.
     ^ newColl
 
@@ -6882,7 +6878,7 @@
 !SequenceableCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.228 2006-02-13 15:01:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.229 2006-02-20 21:30:04 cg Exp $'
 ! !
 
 SequenceableCollection initialize!