Uh oh!
There was an error while loading. Please reload this page.
Cleanup to lsra inspired by #73424 - #73589
Conversation
ghost
commented
Aug 8, 2022
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsInspired by comments (here and here)
|
jakobbotsch
commented
Aug 8, 2022
It might be nice to remove the |
markples
commented
Aug 9, 2022
It built fine on the first try - thanks for the recommendation. |
ghost
commented
Sep 8, 2022
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
Inspired by comments (here and here)
RefPosition* currentRefPosition = &reverseIteratoras it creates two variables that are essentially the same, especially since the iterator has operators like->. In fact, I had to spend a bit of time verifying that there weren't any updates to one but not the other in the code. (And actually Fix undefined behavior found with g++-12 ubsan #73424 did slightly impact this relationship since it moved the assignment from the loop iteration step to the loop body, but I don't believe that this mattered.)I renamed the "iterator" variable to the "position" name to reduce textual churn in the code. This didn't work as well for the range-based loops since they yield -references- to the underlying object so a bunch of C++ punctuation changes.
forconditions and remove duplication between the condition and the loop body. Search forcontinueLoopto see them.operator&on each iterator since they are no longer used and not part of normal iterators.