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

Fix outer loop access instances. #33

Merged
merged 3 commits into from
Jul 24, 2022
Merged

Fix outer loop access instances. #33

merged 3 commits into from
Jul 24, 2022

Conversation

stevewgr
Copy link
Member

@stevewgr stevewgr commented Jul 17, 2022

Description

I used the following regex pattern to find them:
I used the following regex pattern to find them:
(for\s*\(\s*(i|j)\s*=)|(\s*int\s*(i|j)\s*;)
or i|j|k|m|n|l|o|p|x|z (case sensitive & full word) to highlight them while modifying the code.

Note that this was done with extra cautious, because there were some instances
where it was obviously necessary for the variable to be outside if it's
being accessed in another usage.
Other instances were not modified, as they flow of the function with
goto functions was too hectic to change. Mostly noticed through the
server codebase, where the engineers coded as if we're doing C in C++.

@stevewgr stevewgr self-assigned this Jul 17, 2022
Pattern: \s+<ForceConformanceInForLoopScope>false</ForceConformanceInForLoopScope>[\r\n]

Token: \n
I used the following regex pattern to find them:
(for\s*\(\s*(i|j)\s*=)|(\s*int\s*(i|j)\s*;)

Note that this was done with extra cautious, because there were some instances
where it was obviously necessary for the variable to be outside if it's
being accessed in another usage.
Other instances were not modified, as they flow of the function with
goto functions was too hectic to change. Mostly noticed through the
server codebase, where the engineers coded as if we're doing C in C++.
@stevewgr stevewgr marked this pull request as ready for review July 24, 2022 21:42
@stevewgr
Copy link
Member Author

@stevewgr stevewgr merged commit 4302c49 into master Jul 24, 2022
@stevewgr stevewgr deleted the loop-scope branch July 24, 2022 22:04
@stevewgr
Copy link
Member Author

This PR resolves: #34

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

1 participant