-
Notifications
You must be signed in to change notification settings - Fork 226
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
Code clean-up for C++20 conformance #357
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use const char*.
Mark string literals as const. Add explicit char* casts.
Mark string literal as const.
Mark string literal as const.
They don't need to be friends and have to be declared outside the body.
trim() requires L-value ref as a param.
Remove class qualifier.
Mark string literal as const.
Add explicit char* casts. Disambiguate clamp(). Fix FVECTOR2 expression, which requires L-value.
const LPD3DXCOLOR != const D3DXCOLOR *
Add explicit char* casts. Mark string literals as const. "or" is reserved by c++.
Mark string literals as const. Add explcict char* casts. Use ptr() to take addr of a temp.
Use range-based for-loops. Add explicit char* casts. Use ptr() to take addr of a temp.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are the remaining clean-up patches discussed in #338 to enable C++20 standard conformance.
The purpose of these patches is to enable C++20 conformance of the existing code with minimal changes, so that further clean-ups can be done as the next step.
Most of these patches consist of adding
const
to variables pointing to string literals, and where that's not possible, adding explicitchar*
casts.