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

Use function for KEYCODE2 routines instead of macro. #8101

Merged
merged 3 commits into from
Feb 7, 2020

Commits on Feb 5, 2020

  1. Option to use function for KEYCODE2 routines.

    Convert the KEYCODE2SYSTEM and KEYCODE2CONSUMER macros to functions,
    defaulting to using the macros.  The function form allows the compiler
    to optimize the switch statement itself, over the macro nested
    ternaries.
    
    To enable this feature, #define USE_KEYCODE2_FUNCTION.
    
    Testing against a random selection of avr-based keyboards, this
    increased available flash by ~500 bytes. For arm-based keyboards,
    the available flash increased by ~400 bytes.
    kitlaan committed Feb 5, 2020
    Configuration menu
    Copy the full SHA
    c59c643 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2020

  1. Replace macro with function entirely.

    As zvecr states, go bold and just commit to using the function instead
    of the macro.
    kitlaan committed Feb 6, 2020
    Configuration menu
    Copy the full SHA
    f88685a View commit details
    Browse the repository at this point in the history
  2. Reformat whitespace now that functional review is done

    Verified against clang-format output.
    kitlaan committed Feb 6, 2020
    Configuration menu
    Copy the full SHA
    853cd84 View commit details
    Browse the repository at this point in the history