-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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 range iterators for RBSet in most cases #61173
Use range iterators for RBSet in most cases #61173
Conversation
cdc888a
to
655bced
Compare
for (Material *E : shader->owners) { | ||
Material *material = E; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally stuff like this should be this:
for (Material *E : shader->owners) { | |
Material *material = E; | |
for (Material *material : shader->owners) { |
Not sure if I should bother to try and fix all the instances where something like this happens in this PR though. I think it'd be better suited for a future PR, checking for all types range iterators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that could be a follow-up PR yeah, as long as it's not too hard to find those spots after the pact. Maybe grepping for = E;
can help find such locations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I assume the manual fixes in the second commit are actually needed for the first commit to compile properly? If so they should likely be squashed before merge, so that we keep a merged history where all commits can be compiled (important when bisecting). But that can be done at the last minute once we're 100% sure that the script-made changes are good (seems so to me but maybe @reduz wants to give it a quick look too).
Awesome work @LightningAA, you are my hero! |
655bced
to
3062e6c
Compare
I pushed this as an update now so we can merge it right away (as I assume from your timezone that you must be sound asleep right now :P). |
3062e6c
to
4f3020a
Compare
4f3020a
to
900c676
Compare
Thanks! |
See #51409, #50284, #50511
I adapted and refactored the original python script a little, and then proceeded to make some manual changes for some of the more tricky cases that were faster to just correct afterwards.
script