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

ui_button.cpp/.h code clean #9206

Merged
merged 6 commits into from
Oct 23, 2024
Merged

Conversation

Districh-ru
Copy link
Collaborator

This PR updates the ui_button.cpp and ui_button.h code:

  • use unique_prt instead of new/delete;
  • remove the never set Display & output = Display::instance() argument and call Display::instance() only when it is needed for render;
  • make some methods inline (move from cpp to h);
  • ...

@Districh-ru Districh-ru added the improvement New feature, request or improvement label Oct 16, 2024
@Districh-ru Districh-ru added this to the 1.1.4 milestone Oct 16, 2024
@Districh-ru Districh-ru self-assigned this Oct 16, 2024
Copy link
Owner

@ihhub ihhub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Districh-ru , I left one comment here. Can you please check it?

src/fheroes2/gui/ui_button.h Show resolved Hide resolved
Copy link
Owner

@ihhub ihhub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Districh-ru , I left 2 more comments here. Can you please take a look at them?

src/fheroes2/gui/ui_button.cpp Outdated Show resolved Hide resolved
src/fheroes2/gui/ui_button.h Outdated Show resolved Hide resolved
@ihhub ihhub merged commit 6ffd05d into ihhub:master Oct 23, 2024
20 checks passed
@ihhub
Copy link
Owner

ihhub commented Oct 23, 2024

@Districh-ru , thank you very much for this cleanup!

@Districh-ru Districh-ru deleted the ui-button-update branch October 24, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement New feature, request or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants