Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HashSets instead of .Distinct #21311

Merged
merged 1 commit into from Jan 31, 2024
Merged

Use HashSets instead of .Distinct #21311

merged 1 commit into from Jan 31, 2024

Conversation

PunkPun
Copy link
Member

@PunkPun PunkPun commented Jan 22, 2024

Using the correct data type should require less cycles. Also removed a few unnecessary casts to array / list

Copy link
Member

@RoosterDragon RoosterDragon left a comment

Choose a reason for hiding this comment

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

As Distinct() preserves the original ordering, in a few cases I think it'd be safer to stick with that just in case rather than switching to a set which won't preserve the order.

And don't cast to array / list where unnecessary
@atlimit8 atlimit8 merged commit 6026d08 into OpenRA:bleed Jan 31, 2024
3 checks passed
@atlimit8
Copy link
Member

Changelog

@PunkPun PunkPun deleted the hashset branch January 31, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants