]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - tmk_core/common/action_layer.c
hhkb: Revise doc
[max/tmk_keyboard.git] / tmk_core / common / action_layer.c
index 95909cc28617188be248d333c066e40b81f591fc..6b5a7fd2b83e9216939601cb5439ec65da459e86 100644 (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;
             }
         }