File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -268,21 +268,6 @@ CTKeyedTree >> collect: aBlock [
268268 ^ result
269269]
270270
271- { #category : ' copying' }
272- CTKeyedTree >> copy [
273-
274- " Answer a deep copy of the receiver including all subtrees."
275-
276- | result |
277- result := self species new .
278- self keysAndValuesDo: [ :key :value |
279- result at: key put: (
280- (value isKindOf: self class )
281- ifTrue: [ value copy ]
282- ifFalse: [ value ] ) ].
283- ^ result
284- ]
285-
286271{ #category : ' accessing' }
287272CTKeyedTree >> depth [
288273
@@ -496,16 +481,11 @@ CTKeyedTree >> pathsAndValuesDo: aBlock currentPath: pathArray [
496481
497482{ #category : ' copying' }
498483CTKeyedTree >> postCopy [
499-
500- " Ensure proper deep copying of associations and subtrees."
501484
502- array := array collect: [ :assoc |
503- assoc ifNotNil: [
504- Association
505- key: assoc key
506- value: ((assoc value isKindOf: self class )
507- ifTrue: [ assoc value copy ]
508- ifFalse: [ assoc value ]) ] ]
485+ super postCopy.
486+ self keysAndValuesDo: [ :key :value |
487+ (value isKindOf: self class )
488+ ifTrue: [ self at: key put: value copy ] ]
509489]
510490
511491{ #category : ' printing' }
You can’t perform that action at this time.
0 commit comments