-
-
Notifications
You must be signed in to change notification settings - Fork 108
Misc fixes #277
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
Merged
Merged
Misc fixes #277
Conversation
This file contains hidden or 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
Contributor
Author
|
Hmm, there's a bug in there somewhere. Odd. It seemed to work fine for me. I'll update the PR once I've found and fixed the issue. |
Get rid of a bunch of 'else' statements after returns. Improves readability and shortens the source.
When it's possible to simplify the code and/or improve readability by using std::min or std::max, do so.
Don't compare against empty objects or if size > 0 etc, .empty() communicates much more clearly.
Both to help readability and to prevent bugs due to accidental modification.
Just use the overload that takes an initializer-list - simpler.
We don't need 'pair' to be a copy, a const reference is enough.
tgui::Texture::getBackendTextureLoader() is static, accessing it via an instance is pointless.
There's no reason for the vector to have to do multiple allocations when the capacity we need is known up-front.
No move will actually happen.
Contributor
Author
|
Found and fixed the issue. I had made a stupid mistake while rebasing some changes. It should all be good now :) |
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.
Hi Texus
Here's another batch of fixes/cleanups.
I hope you like it.
Let me know if you need any changes made or want some of the changes dropped - feedback is always welcome.
Kind regards
Jesper Juhl