summaryrefslogtreecommitdiffstats
path: root/users/drashna
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna')
-rw-r--r--users/drashna/keyrecords/tap_dance.md2
-rw-r--r--users/drashna/keyrecords/tap_dances.c2
-rw-r--r--users/drashna/keyrecords/unicode.c2
-rw-r--r--users/drashna/oled/oled_stuff.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/users/drashna/keyrecords/tap_dance.md b/users/drashna/keyrecords/tap_dance.md
index 0bf67cbd5a..fef1435918 100644
--- a/users/drashna/keyrecords/tap_dance.md
+++ b/users/drashna/keyrecords/tap_dance.md
@@ -88,7 +88,7 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) {
diablo_timer[diablo_keys->index].keycode = diablo_keys->keycode;
// if the tapdance is hit more than the number of elemints in the array, reset
- if (state->count >= (sizeof(diablo_times) / sizeof(uint8_t) ) ) {
+ if (state->count >= ARRAY_SIZE(diablo_times) ) {
diablo_timer[diablo_keys->index].key_interval = 0;
reset_tap_dance(state);
} else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one)
diff --git a/users/drashna/keyrecords/tap_dances.c b/users/drashna/keyrecords/tap_dances.c
index 6caf6b6b3e..7bdea3cae3 100644
--- a/users/drashna/keyrecords/tap_dances.c
+++ b/users/drashna/keyrecords/tap_dances.c
@@ -23,7 +23,7 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) {
diablo_timer[diablo_keys->index].keycode = diablo_keys->keycode;
// if the tapdance is hit more than the number of elemints in the array, reset
- if (state->count >= (sizeof(diablo_times) / sizeof(uint8_t))) {
+ if (state->count >= ARRAY_SIZE(diablo_times)) {
diablo_timer[diablo_keys->index].key_interval = 0;
reset_tap_dance(state);
} else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one)
diff --git a/users/drashna/keyrecords/unicode.c b/users/drashna/keyrecords/unicode.c
index b3fc71cb09..bfce38f555 100644
--- a/users/drashna/keyrecords/unicode.c
+++ b/users/drashna/keyrecords/unicode.c
@@ -43,7 +43,7 @@ typedef uint32_t (*translator_function_t)(bool is_shifted, uint32_t keycode);
static inline uint32_t translator_name(bool is_shifted, uint32_t keycode) { \
static const uint32_t translation[] = {__VA_ARGS__}; \
uint32_t ret = keycode; \
- if ((keycode - KC_A) < (sizeof(translation) / sizeof(uint32_t))) { \
+ if ((keycode - KC_A) < ARRAY_SIZE(translation)) { \
ret = translation[keycode - KC_A]; \
} \
return ret; \
diff --git a/users/drashna/oled/oled_stuff.c b/users/drashna/oled/oled_stuff.c
index e082f8ab3e..68801b80a4 100644
--- a/users/drashna/oled/oled_stuff.c
+++ b/users/drashna/oled/oled_stuff.c
@@ -87,7 +87,7 @@ void add_keylog(uint16_t keycode, keyrecord_t *record) {
memmove(keylog_str, keylog_str + 1, OLED_KEYLOGGER_LENGTH - 1);
- if (keycode < (sizeof(code_to_name) / sizeof(char))) {
+ if (keycode < ARRAY_SIZE(code_to_name)) {
keylog_str[(OLED_KEYLOGGER_LENGTH - 1)] = pgm_read_byte(&code_to_name[keycode]);
}