Compile error if ONESHOT_TIMEOUT defined but oneshot disabled (#8100)

* Compile error if ONESHOT_TIMEOUT defined but oneshot disabled

When ONESHOT_TIMEOUT and NO_ACTION_ONESHOT are both defined, this code
fails to compile.

Wrap the one usage of ONESHOT_TIMEOUT that is inconsistent with the
rest so all usages are properly wrapped by a check of NO_ACTION_ONESHOT.

* Run file through clang-format

Co-authored-by: Ted M Lin <tedmlin@gmail.com>
This commit is contained in:
Ted Lin 2020-02-09 23:50:45 -05:00 committed by GitHub
parent 6052aa499e
commit c3200aa8fc

View file

@ -90,6 +90,7 @@ void action_exec(keyevent_t event) {
keyrecord_t record = {.event = event};
#ifndef NO_ACTION_ONESHOT
# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
if (has_oneshot_layer_timed_out()) {
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
@ -98,6 +99,7 @@ void action_exec(keyevent_t event) {
clear_oneshot_mods();
}
# endif
#endif
#ifndef NO_ACTION_TAPPING
action_tapping_process(record);