Skip to content

Conversation

0tkl
Copy link
Contributor

@0tkl 0tkl commented Jun 3, 2025

Cherry-pick my recent commits from local repo, which I built for my own use.

The first commit, fix combine-config.py, is a bugfix. My local build will failed if this commit is not applied.

The next two commits, remove override functions and add missing headers, are cosmetic changes to actual code.

The rest of commits are cosmetic changes to comments and documentation.

@0tkl 0tkl force-pushed the miscfix branch 4 times, most recently from b033844 to 0a41d2f Compare June 5, 2025 14:42
#define CMD_TYPE(a) int Type() const override { using namespace cmd; return a; }

#define CMD_ICON(icon) wxBitmapBundle Icon(int height, wxLayoutDirection dir = wxLayout_LeftToRight) const override { \
#define CMD_ICON(icon) wxBitmapBundle Icon(int height, wxLayoutDirection dir) const override { \
Copy link
Member

Choose a reason for hiding this comment

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

Is this really correct? cppreference says

The overriders of virtual functions do not acquire the default arguments from the base class declarations, and when the virtual function call is made, the default arguments are decided based on the static type of the object.

Seeing as this compiles, it looks like this function is never actually called on a [variable whose static type is a] derived command class, but it sounds possible that this could be wanted at some point in the future (say you wanted to also show the icon of a specific command elsewhere).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dropped from PR for further discussion.

@arch1t3cht arch1t3cht merged commit f3a2d9b into TypesettingTools:master Jun 9, 2025
5 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