Skip to content

Commit

Permalink
change ARRAYSIZE to ARRAY_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
gourdo1 committed Apr 9, 2023
1 parent 989b4a6 commit cdbb3e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
// CapsLock RGB setup
if (led_state.caps_lock) {
if (user_config.rgb_hilite_caps) {
for (uint8_t i = 0; i < ARRAYSIZE(LED_LIST_LETTERS); i++) {
for (uint8_t i = 0; i < ARRAY_SIZE(LED_LIST_LETTERS); i++) {
rgb_matrix_set_color(LED_LIST_LETTERS[i], RGB_CHARTREUSE);
}
rgb_matrix_set_color(LED_L7, RGB_CHARTREUSE);
Expand Down Expand Up @@ -320,7 +320,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
rgb_matrix_set_color(LED_FN, RGB_RED); //FN key

//NEW RGB LIGHTING TO RING KEYBOARD ON FN LAYER ACTIVATION:
for (uint8_t j = 0; j < ARRAYSIZE(LED_LIST_FUNCROW); j++) {
for (uint8_t j = 0; j < ARRAY_SIZE(LED_LIST_FUNCROW); j++) {
rgb_matrix_set_color(LED_LIST_FUNCROW[j], RGB_RED);
}
rgb_matrix_set_color(LED_LCTL, RGB_RED);
Expand Down Expand Up @@ -443,7 +443,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
}
#endif // INVERT_NUMLOCK_INDICATOR
if (user_config.rgb_hilite_numpad) {
for (uint8_t i = 0; i < ARRAYSIZE(LED_LIST_NUMPAD); i++) {
for (uint8_t i = 0; i < ARRAY_SIZE(LED_LIST_NUMPAD); i++) {
rgb_matrix_set_color(LED_LIST_NUMPAD[i], RGB_OFFBLUE);
}
rgb_matrix_set_color(LED_L5, RGB_OFFBLUE);
Expand Down Expand Up @@ -481,7 +481,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
// Colemak layer RGB
#ifdef COLEMAK_LAYER_ENABLE
case _COLEMAK:
for (uint8_t i = 0; i < ARRAYSIZE(LED_SIDE_RIGHT); i++) {
for (uint8_t i = 0; i < ARRAY_SIZE(LED_SIDE_RIGHT); i++) {
rgb_matrix_set_color(LED_SIDE_RIGHT[i], RGB_MAGENTA);
rgb_matrix_set_color(LED_SIDE_LEFT[i], RGB_MAGENTA);
}
Expand Down
10 changes: 5 additions & 5 deletions keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (led_state.caps_lock) {
if (user_config.rgb_hilite_caps) {
if (user_config.rgb_english_caps) {
for (uint8_t i = 0; i < ARRAYSIZE(LED_LIST_LETTERS); i++) {
for (uint8_t i = 0; i < ARRAY_SIZE(LED_LIST_LETTERS); i++) {
rgb_matrix_set_color(LED_LIST_LETTERS[i], RGB_CHARTREUSE);
}
}
else {
for (uint8_t i = 0; i < ARRAYSIZE(LED_LIST_LETTERS_DE); i++) {
for (uint8_t i = 0; i < ARRAY_SIZE(LED_LIST_LETTERS_DE); i++) {
rgb_matrix_set_color(LED_LIST_LETTERS_DE[i], RGB_CHARTREUSE);
}
}
Expand Down Expand Up @@ -328,7 +328,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
rgb_matrix_set_color(LED_FN, RGB_RED); //FN key

//NEW RGB LIGHTING TO RING KEYBOARD ON FN LAYER ACTIVATION:
for (uint8_t j = 0; j < ARRAYSIZE(LED_LIST_FUNCROW); j++) {
for (uint8_t j = 0; j < ARRAY_SIZE(LED_LIST_FUNCROW); j++) {
rgb_matrix_set_color(LED_LIST_FUNCROW[j], RGB_RED);
}
rgb_matrix_set_color(LED_LCTL, RGB_RED);
Expand Down Expand Up @@ -456,7 +456,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
}
#endif // INVERT_NUMLOCK_INDICATOR
if (user_config.rgb_hilite_numpad) {
for (uint8_t i = 0; i < ARRAYSIZE(LED_LIST_NUMPAD); i++) {
for (uint8_t i = 0; i < ARRAY_SIZE(LED_LIST_NUMPAD); i++) {
rgb_matrix_set_color(LED_LIST_NUMPAD[i], RGB_OFFBLUE);
}
rgb_matrix_set_color(LED_L5, RGB_OFFBLUE);
Expand Down Expand Up @@ -494,7 +494,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
// Colemak layer RGB
#ifdef COLEMAK_LAYER_ENABLE
case _COLEMAK:
for (uint8_t i = 0; i < ARRAYSIZE(LED_SIDE_RIGHT); i++) {
for (uint8_t i = 0; i < ARRAY_SIZE(LED_SIDE_RIGHT); i++) {
rgb_matrix_set_color(LED_SIDE_RIGHT[i], RGB_MAGENTA);
rgb_matrix_set_color(LED_SIDE_LEFT[i], RGB_MAGENTA);
}
Expand Down
2 changes: 1 addition & 1 deletion users/gourdo1/gourdo1.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once

// DEFINE MACROS
#define ARRAYSIZE(arr) sizeof(arr) / sizeof(arr[0])
//#define ARRAY_SIZE(arr) sizeof(arr) / sizeof(arr[0])

// LAYERS -- Note: to avoid compile problems, make sure total layers matches DYNAMIC_KEYMAP_LAYER_COUNT defined in config.h (where _COLEMAK layer is defined)
enum custom_user_layers {
Expand Down

0 comments on commit cdbb3e8

Please sign in to comment.