core: action codes are action_t struct now

This commit is contained in:
tmk 2016-03-30 03:37:57 +09:00
parent 9839bb83d9
commit e5cb8469af
4 changed files with 21 additions and 23 deletions

View file

@ -117,7 +117,7 @@ void layer_debug(void)
action_t layer_switch_get_action(keypos_t key)
{
action_t action = { .code = ACTION_TRANSPARENT };
action_t action = ACTION_TRANSPARENT;
#ifndef NO_ACTION_LAYER
uint32_t layers = layer_state | default_layer_state;
@ -125,7 +125,7 @@ action_t layer_switch_get_action(keypos_t key)
for (int8_t i = 31; i >= 0; i--) {
if (layers & (1UL<<i)) {
action = action_for_key(i, key);
if (action.code != ACTION_TRANSPARENT) {
if (action.code != (action_t)ACTION_TRANSPARENT.code) {
return action;
}
}