diff options
Diffstat (limited to 'keyboards/horrortroll/handwired_k552')
3 files changed, 3 insertions, 3 deletions
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h index a97b46e5e4..8c4f9d0d4b 100644 --- a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h +++ b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h @@ -110,7 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { {{205, 250, 255}, {140, 215, 125}, false }, }; - uint8_t gp_length = sizeof(gradient_presets)/sizeof(gradient_presets[0]); + uint8_t gp_length = ARRAY_SIZE(gradient_presets); switch (keycode) { case G1_HUI: diff --git a/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h b/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h index a97b46e5e4..8c4f9d0d4b 100644 --- a/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h +++ b/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h @@ -110,7 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { {{205, 250, 255}, {140, 215, 125}, false }, }; - uint8_t gp_length = sizeof(gradient_presets)/sizeof(gradient_presets[0]); + uint8_t gp_length = ARRAY_SIZE(gradient_presets); switch (keycode) { case G1_HUI: diff --git a/keyboards/horrortroll/handwired_k552/lib/wave.c b/keyboards/horrortroll/handwired_k552/lib/wave.c index 79b4e0ced7..700f73aee5 100644 --- a/keyboards/horrortroll/handwired_k552/lib/wave.c +++ b/keyboards/horrortroll/handwired_k552/lib/wave.c @@ -68,7 +68,7 @@ void add_keylog(uint16_t keycode) { keycode = 0; } - if (keycode < (sizeof(code_to_name) / sizeof(char))) { + if (keycode < ARRAY_SIZE(code_to_name)) { char log_char = pgm_read_byte(&code_to_name[keycode]); for (uint8_t j = 0; j < OLED_FONT_WIDTH; j++) { |