X Tutup
Skip to content

Store ThemeOwner owner directly as Node*#111249

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
HolonProduction:owner-node
Oct 7, 2025
Merged

Store ThemeOwner owner directly as Node*#111249
Repiteo merged 1 commit intogodotengine:masterfrom
HolonProduction:owner-node

Conversation

@HolonProduction
Copy link
Member

At the moment ThemeOwner stores its owner node casted to either Control or Window. Those casted pointers are never really used and all public methods just use Node * so we can store the pointer directly without casting.

Main benefit is just to remove some noise from the code. I was looking a bit into the theming system and it took me way to long to realize that those methods and members don't really do anything relevant.

@HolonProduction HolonProduction requested a review from a team as a code owner October 4, 2025 10:19
@HolonProduction
Copy link
Member Author

Added a fix to the check, to allow nullptr in addition to Control and Window instances.

@Repiteo Repiteo merged commit 0f7bf29 into godotengine:master Oct 7, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 7, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup