Skip to content

Avoid usedElements around code that modifies that value#3488

Merged
kripken merged 1 commit intomasterfrom
unused
Jan 14, 2021
Merged

Avoid usedElements around code that modifies that value#3488
kripken merged 1 commit intomasterfrom
unused

Conversation

@kripken
Copy link
Member

@kripken kripken commented Jan 13, 2021

Followup to #3486, I wonder if it isn't a little more clear this way,
which avoids the confusion of usedElements being changed
while we are using it?

In general I think it's best to only use usedElements in the most
internal methods, and to call size() otherwise. But I don't feel
strongly.

@kripken kripken requested review from aheejin and dcodeIO January 13, 2021 21:28
Copy link
Contributor

@dcodeIO dcodeIO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes it more clear to me :)

@kripken kripken merged commit 01e0c98 into master Jan 14, 2021
@kripken kripken deleted the unused branch January 14, 2021 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants