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

build.c: Replace 3 unhygienic set_key_* macros with 2 functions #2286

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

Conversation

ntrel
Copy link
Member

@ntrel ntrel commented Sep 5, 2019

The macros were used to generate the key string to use in the [build-menu] setting of each keyfile.

  • Use one function to set both the group and command index, encapsulating the sprintf(cmdbuf code.
  • Use a separate function to set the field of the command, as this is needed 3 times per command. This takes a GEANY_BC_* value instead of a string literal for clarity.
  • Merge 2 for loops.

(This also makes 2 global scope string arrays into local arrays).

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.

None yet

1 participant