VarArray.st
changeset 58 bd6753bf0401
parent 42 506596f9a1a8
child 84 d401ce0001dc
--- a/VarArray.st	Wed Feb 15 11:21:53 1995 +0100
+++ b/VarArray.st	Wed Feb 15 11:29:31 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic2/Attic/VarArray.st,v 1.8 1994-10-10 00:52:54 claus Exp $
+$Header: /cvs/stx/stx/libbasic2/Attic/VarArray.st,v 1.9 1995-02-15 10:29:29 claus Exp $
 '!
 
 !VariableArray class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic2/Attic/VarArray.st,v 1.8 1994-10-10 00:52:54 claus Exp $
+$Header: /cvs/stx/stx/libbasic2/Attic/VarArray.st,v 1.9 1995-02-15 10:29:29 claus Exp $
 "
 !
 
@@ -51,7 +51,7 @@
     VariableArrays can grow and shrink - in contrast to Arrays which are
     fixed in size. 
     WARNING: Do not use this class for new applications - its a historic 
-             leftover from times when no OrderedCollection existed.
+	     leftover from times when no OrderedCollection existed.
 
     Use OrderedCollection, which offers more functionality, and is even
     a bit faster in some operations.
@@ -238,6 +238,8 @@
 
     |newArray|
 
+    (newSize == tally) ifTrue:[^ self].
+
     (newSize > tally) ifTrue:[
 	(newSize > contentsArray size) ifTrue:[
 	    newArray := Array new:(newSize * 2).