#REFACTORING by stefan
authorStefan Vogel <sv@exept.de>
Fri, 23 Jun 2017 16:48:11 +0200
changeset 21924 9769324e75d1
parent 21923 cff24fa817b0
child 21925 d19035abe7ac
#REFACTORING by stefan class: WeakArray changed: #addDependent:
WeakArray.st
--- a/WeakArray.st	Fri Jun 23 16:40:12 2017 +0200
+++ b/WeakArray.st	Fri Jun 23 16:48:11 2017 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1991 by Claus Gittinger
 	      All Rights Reserved
@@ -388,38 +390,39 @@
 
     wasBlocked := OperatingSystem blockInterrupts.
     [
-	|deps|
+        |deps|
 
-	deps := dependents.
-	"/
-	"/ store the very first dependent directly in
-	"/ the dependents instVar
-	"/
-	(deps isNil and:[anObject isCollection not]) ifTrue:[
-	    dependents := anObject
-	] ifFalse:[
-	    "/
-	    "/ store more dependents in the dependents collection
-	    "/
-	    deps isCollection ifTrue:[
-		deps add:anObject
-	    ] ifFalse:[
-		deps == anObject ifFalse:[
-		    deps isNil ifTrue:[
-			dependents := (IdentitySet with:anObject)
-		    ] ifFalse:[
-			dependents := (IdentitySet with:deps with:anObject)
-		    ]
-		]
-	    ]
-	]
+        deps := dependents.
+        "/
+        "/ store the very first dependent directly in
+        "/ the dependents instVar
+        "/
+        (deps isNil and:[anObject isCollection not]) ifTrue:[
+            dependents := anObject
+        ] ifFalse:[
+            "/
+            "/ store more dependents in the dependents collection
+            "/
+            deps isCollection ifTrue:[
+                deps add:anObject
+            ] ifFalse:[
+                deps ~~ anObject ifTrue:[
+                    deps isNil ifTrue:[
+                        dependents := IdentitySet with:anObject.
+                    ] ifFalse:[
+                        dependents := IdentitySet with:deps with:anObject.
+                    ]
+                ]
+            ]
+        ]
     ] ensure:[
-	wasBlocked ifFalse:[
-	    OperatingSystem unblockInterrupts
-	]
+        wasBlocked ifFalse:[
+            OperatingSystem unblockInterrupts
+        ]
     ]
 
-    "Modified: 8.1.1997 / 23:40:30 / cg"
+    "Modified: / 08-01-1997 / 23:40:30 / cg"
+    "Modified: / 23-06-2017 / 10:43:20 / stefan"
 !
 
 dependents