Skip to content

Conversation

@jjuhl
Copy link
Contributor

@jjuhl jjuhl commented Jan 1, 2026

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

@jjuhl
Copy link
Contributor Author

jjuhl commented Jan 1, 2026

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.

jjuhl added 14 commits January 1, 2026 21:21
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.
@jjuhl
Copy link
Contributor Author

jjuhl commented Jan 1, 2026

Found and fixed the issue. I had made a stupid mistake while rebasing some changes. It should all be good now :)

@texus texus merged commit d299eb0 into texus:1.x Jan 2, 2026
15 checks passed
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.

2 participants