Skip to content

Commit

Permalink
fix: move array size fun to sjb.h so we can reuse it in other mods
Browse files Browse the repository at this point in the history
  • Loading branch information
SjB committed Mar 28, 2023
1 parent d1446b0 commit ccca0c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion users/sjb/combos.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#define SJB_DEFINE_KEY(name, args...) const uint16_t PROGMEM combo_##name[] = {args, COMBO_END}
#define SJB_COMBO(name, action) COMBO(combo_##name, action)

#define ARRAYSIZE(arr) sizeof(arr) / sizeof(arr[0])

SJB_DEFINE_KEY(CK_LBOOT, KC_Q, KC_T);
SJB_DEFINE_KEY(CK_RBOOT, KC_P, KC_Y);
Expand Down
2 changes: 2 additions & 0 deletions users/sjb/sjb.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#include "quantum.h"

#define ARRAYSIZE(arr) sizeof(arr) / sizeof(arr[0])

enum custom_keycodes {
SJB_LLOCK = SAFE_RANGE,
SJB_RSTL,
Expand Down

0 comments on commit ccca0c0

Please sign in to comment.