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

Widget, avoid copying child list when reverse iterating. #20151

Merged
merged 1 commit into from Jul 31, 2022

Conversation

anvilvapre
Copy link
Contributor

I assume that the call to OfType was only used to ensure that not List.Reverse would be called that would reverse the list in place - to ensure LINQ Reverse would be called on an Enumerable.

Or was it meant to filter out null values?

@RoosterDragon
Copy link
Member

Or was it meant to filter out null values?

Other places iterate the list forwards without null checks, so yes it must be for the first reason and not as a null guard.

@abcdefg30 abcdefg30 merged commit 3f3687f into OpenRA:bleed Jul 31, 2022
@abcdefg30
Copy link
Member

Changelog

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.

None yet

3 participants