-
Notifications
You must be signed in to change notification settings - Fork 29
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
scriptcomp: Replace all adhoc vector implementations with std::vector #82
Comments
I'll handle it, unless someone can find a reason for this not to be cleaned up. For those unfamiliar with my name, PastorPug on discord. |
When looking for more arrays that could be vectors I came across
Keywords are added as such:
and added to the hash manager as such:
Now here's the problem. Outside of the fact that This entire section can be rewritten as a single vector and a struct with two fields (the string and token). Appending to the hash manager can similarly be done as a loop over a vector rather than maintaining a constant separately. The question is whether this specific case is the domain of this issue. The discord server had talks about overloading functions, which would involve changing up the hash manager (and in turn, likely the keywords), hence I could leave this untouched for the person that will eventually work on that. Alternatively I could spend the 10 minutes required to rework this regardless. As an aside, pragmatically speaking I'm quite sure writing this took me substantially more time than simply having a piece of code accepted or rejected in a pull request, but I assume it's good manners to bring things like this up. Would it be preferred if I raised issues like this or do I have a go-ahead signal on going potentially slightly out of the scope of the containing issue and resolve the matter during the pull request? |
Just code cleanup, we have a lot of cases such as:
This should all go away and
m_pnSwitchLabelStatements
should be astd::vector
Some such cases:
m_pnSwitchLabelStatements
m_pchResolvedOutputBuffer
m_pSymbolLabelList
m_pSymbolQueryList
m_pchDebuggerCode
m_pSRStack
There's probably a good 300 lines of code to just be deleted with this; and makes it less error prone.
The text was updated successfully, but these errors were encountered: