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

Ensure _Idx is only worked on if it has to be. #3658

Merged
merged 1 commit into from
Apr 28, 2023

Conversation

AreaZR
Copy link
Contributor

@AreaZR AreaZR commented Apr 17, 2023

I don't know if whatever compile is supposed to compile this will notice, but this is the only place where this structure appears, so it seems best that the incrementation be done within the loop.

I don't know if whatever compile is supposed to compile this will notice, but this is the only place where this structure appears, so it seems best that the incrementation be done within the loop.
@AreaZR AreaZR requested a review from a team as a code owner April 17, 2023 20:36
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Apr 17, 2023
Copy link
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

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

Small change, but appreciated.

@StephanTLavavej
Copy link
Member

This is correct (no effective behavioral change) because _Idx isn't observed after the loop, so it doesn't matter that we're changing from wrapping around the size_t to leaving it at 0.

@StephanTLavavej StephanTLavavej self-assigned this Apr 27, 2023
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 3e75f32 into microsoft:main Apr 28, 2023
@StephanTLavavej
Copy link
Member

Thanks for cleaning up this code! 🧹 🐱 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants