Skip to content
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

Simplified the code of GOButtonCreator #2130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oleg68
Copy link
Contributor

@oleg68 oleg68 commented Feb 27, 2025

This PR makes the code of GOButtonCreator a little bit simpler.

Earlier there was a virtual method GetButtonDefinitionList() that returned button definitions. GOButtonCreator::CreateButtons was calling GetButtonDefinitionList().

Because CreateButtons() was called only from GOButtonCreator subclasses where the button definitions were known, this PR makes passing the button definitions to CreateButtons() directly. It makes GetButtonDefinitionList() unnecessary.

It also renames the m_element_types members in the subclasses to BUTTON_DEFS and makes the static variables in their cpp files.

It is only refactoring. No GO behavior should be changed.

@oleg68 oleg68 changed the title Simplified code of GOButtonCreator Simplified the code of GOButtonCreator Feb 27, 2025
@oleg68 oleg68 force-pushed the refactor/create-buttons branch from 7e7fc07 to 219b23c Compare February 27, 2025 19:12
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.

1 participant