-
Notifications
You must be signed in to change notification settings - Fork 173
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
refactor: Change TryParse implementation #1442
refactor: Change TryParse implementation #1442
Conversation
Can you elaborate on general cleanup? |
I can try and split out the unrelated changes later. It's kind of hard because I tend to notice and address issues as I'm working on a primary goal, but it isn't good practice to mix them up I agree. For the most part, they're really minor. A few [[nodiscard]] tags here, a few consts there... that sort of thing. |
Just as a note, we wont be enforcing nodiscard as an attribute in any prs, nor will we be requiring it for apis. Nothing against adding them, just wont be enforcing it |
Didn't expect any different, just trying to do my part for keeping code intentions clear. As far as the failed CI, I suspected that it wouldn't work on MacOS given our previous conversations, so I actually have the fallback floating point code ready to go (just commented out). I much prefer from_chars though, so I'll probably wrap it in a pre-processor block so it is ONLY present on Mac. One neat thing is that the way the concept resolution works, I don't actually need to change anything in the other templates to make floating points switch over: They see the more specific constraint and immediately start using that one. At least, this is the behavior I saw on my end. |
how has this been tested? |
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 am only reviewing the GeneralUtils.h header for now until the other unrelated changes are reverted. There are a lot of unrelated changes here which make the pr much larger to review than it needs to be
I've run around VE, AG, and Ninjago completing missions and playing normally for about 90 minutes and haven't noticed anything strange with the Ubuntu build. |
I don't think there were very many? I had to do a lot of changes relating to the actual TryParse invocations, but aside from QuickbuildComponent (which I will split out sometime tomorrow) it was pretty much just tossing a few 'consts' on things I saw that didn't need to be mutable. Even QuickbuildComponent was just adjusting for const correctness, attrib tagging, and marking noexcept. |
Ah, forgot about dCommonVars.h. I see what you mean a bit better now. |
In the future we'd appreciate isolated pr changes for things that are very much not related. |
Yeah commonvars.h is the main one I was looking at. With those being really compiler only changes they would be better suited in their own pr, but if you don't want to move them now it's fine, just will take more time to review |
Actually, no I'm not going to rename that variable with the m_ prefix. That would need to be a PR of its own because it creates so many problems. I will be reverting my commits to that effect. |
…meServer into TryParseChanges
…THIS should be the last commit pending CI
… they're C++ headers. Pinky swear this is it!
okay pinky swear that is It. I will resist the urge to add anything more unless the CI fails again |
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.
pending ci
Changed the TryParse function to use from_chars(), natively handle enums, and have a better syntax. Also did some cleanup along the way, particularly regarding the function declarations of QuickbuildComponent.h.
Need to see how these changes compile on the other platforms, but have had good experience testing on my own.