core: Fix for build option NO_ACTION_LAYER
authortmk <hasu@tmk-kbd.com>
Thu, 14 Sep 2017 03:58:06 +0000 (12:58 +0900)
committertmk <hasu@tmk-kbd.com>
Thu, 14 Sep 2017 03:58:06 +0000 (12:58 +0900)
tmk_core/common/action_layer.c
tmk_core/common/action_layer.h

index 46401eba6248483bbf75e48408da12b3acc9da27..31d659b7aab2d6544dd50f535af5dfe05ce1e370 100644 (file)
@@ -122,9 +122,8 @@ void layer_debug(void)
 /* return layer effective for key at this time */
 static uint8_t current_layer_for_key(keypos_t key)
 {
-    action_t action = ACTION_TRANSPARENT;
-
 #ifndef NO_ACTION_LAYER
+    action_t action = ACTION_TRANSPARENT;
     uint32_t layers = layer_state | default_layer_state;
     /* check top layer first */
     for (int8_t i = 31; i >= 0; i--) {
index ba8b06384ccb3cba067108f1f617cb65f1d96d9b..2811cd7c7cb5d45c607fa43bdf7a9fcc902c042f 100644 (file)
@@ -34,10 +34,6 @@ void default_layer_set(uint32_t state);
 void default_layer_or(uint32_t state);
 void default_layer_and(uint32_t state);
 void default_layer_xor(uint32_t state);
-#else
-#define default_layer_or(state)
-#define default_layer_and(state)
-#define default_layer_xor(state)
 #endif
 
 
@@ -56,18 +52,6 @@ void layer_invert(uint8_t layer);
 void layer_or(uint32_t state);
 void layer_and(uint32_t state);
 void layer_xor(uint32_t state);
-#else
-#define layer_state             0
-#define layer_clear()
-#define layer_move(layer)
-#define layer_on(layer)
-#define layer_off(layer)
-#define layer_invert(layer)
-
-#define layer_or(state)
-#define layer_and(state)
-#define layer_xor(state)
-#define layer_debug()
 #endif
 
 
Imprint / Impressum