]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Empty implementation of has_onshot_mods_timed_out
authorFred Sundvik <fsundvik@gmail.com>
Tue, 28 Mar 2017 06:59:29 +0000 (09:59 +0300)
committerFred Sundvik <fsundvik@gmail.com>
Sun, 9 Apr 2017 15:34:59 +0000 (18:34 +0300)
When the timeout is zero or not defined, the function now returns false.
Fixes a linker error when the visualizer is enabled

tmk_core/common/action_util.c

index cb4b2526484e59fc31191ca10286176533e30585..77848c0923848ffa69896221c62c461d79b858f6 100644 (file)
@@ -58,9 +58,13 @@ void set_oneshot_locked_mods(int8_t mods) { oneshot_locked_mods = mods; }
 void clear_oneshot_locked_mods(void) { oneshot_locked_mods = 0; }
 #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
 static int16_t oneshot_time = 0;
-inline bool has_oneshot_mods_timed_out() {
+bool has_oneshot_mods_timed_out(void) {
   return TIMER_DIFF_16(timer_read(), oneshot_time) >= ONESHOT_TIMEOUT;
 }
+#else
+bool has_oneshot_mods_timed_out(void) {
+    return false;
+}
 #endif
 #endif