#REFACTORING by exept
authorClaus Gittinger <cg@exept.de>
Fri, 08 Nov 2019 09:06:25 +0100
changeset 24892 2213eb56e0c7
parent 24891 f1946e74b803
child 24893 373cc0ac5f71
#REFACTORING by exept class: OrderedCollection changed: #replaceFrom:to:with:startingAt:
OrderedCollection.st
--- a/OrderedCollection.st	Fri Nov 08 09:05:28 2019 +0100
+++ b/OrderedCollection.st	Fri Nov 08 09:06:25 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -1704,21 +1706,21 @@
     |end|
 
     end := stop + firstIndex - 1.
-    ((start >= 1) and:[end <= lastIndex]) ifTrue:[
-	aCollection class == self class ifTrue:[
-	    contentsArray
-		replaceFrom:(start + firstIndex - 1)
-		to:end
-		with:aCollection contentsArray
-		startingAt:(repStart + aCollection firstIndex - 1).
-	] ifFalse:[
-	    contentsArray
-		replaceFrom:(start + firstIndex - 1)
-		to:end
-		with:aCollection
-		startingAt:repStart.
-	].
-	^ self
+    ((start > 0) and:[end <= lastIndex]) ifTrue:[
+        aCollection class == self class ifTrue:[
+            contentsArray
+                replaceFrom:(start + firstIndex - 1)
+                to:end
+                with:aCollection contentsArray
+                startingAt:(repStart + aCollection firstIndex - 1).
+        ] ifFalse:[
+            contentsArray
+                replaceFrom:(start + firstIndex - 1)
+                to:end
+                with:aCollection
+                startingAt:repStart.
+        ].
+        ^ self
     ].
     ^ super replaceFrom:start to:stop with:aCollection startingAt:repStart