Skip to content

Commit

Permalink
remove line that recreates previousVersion for no reason.
Browse files Browse the repository at this point in the history
The variable previousVersion stored an array of the keys belonging to the dictionary undoMap. This last line regenerated this array for no reason, since previousVersion is a local variable and is not mutated inside the message's body.
  • Loading branch information
lopezca committed Sep 27, 2023
1 parent 964aae4 commit 9d9f85c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Glorp/ObjectTransaction.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ ObjectTransaction >> registeredObjectsDo: aBlock [
newAdditions := OrderedCollection new.
undoMap
keysDo:
[:eachKey | (previousVersion includes: eachKey) ifFalse: [newAdditions add: eachKey]].
newAdditions isEmpty ifFalse: [previousVersion := undoMap keys]]
[:eachKey | (previousVersion includes: eachKey) ifFalse: [newAdditions add: eachKey]]]
]

{ #category : #registering }
Expand Down

0 comments on commit 9d9f85c

Please sign in to comment.