From 63776e36b5f8bf88ead2e53ed20426f33457f1f3 Mon Sep 17 00:00:00 2001 From: jding Date: Sat, 30 Oct 2021 00:25:08 +0000 Subject: [PATCH] remove unnecessary if statement --- app/src/behaviors/behavior_hold_tap.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index 3ba88838..3073c6d0 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -413,18 +413,15 @@ static void decide_hold_tap(struct active_hold_tap *hold_tap, enum decision_mome return; } - // If the hold-tap behavior is still undecided, attempt to decide it. - if (hold_tap->status == STATUS_UNDECIDED) { - switch (hold_tap->config->flavor) { - case FLAVOR_HOLD_PREFERRED: - decide_hold_preferred(hold_tap, decision_moment); - case FLAVOR_BALANCED: - decide_balanced(hold_tap, decision_moment); - case FLAVOR_TAP_PREFERRED: - decide_tap_preferred(hold_tap, decision_moment); - case FLAVOR_TAP_POSITIONALLY_PREFERRED: - decide_tap_positionally_preferred(hold_tap, decision_moment, other_key_down_pos); - } + switch (hold_tap->config->flavor) { + case FLAVOR_HOLD_PREFERRED: + decide_hold_preferred(hold_tap, decision_moment); + case FLAVOR_BALANCED: + decide_balanced(hold_tap, decision_moment); + case FLAVOR_TAP_PREFERRED: + decide_tap_preferred(hold_tap, decision_moment); + case FLAVOR_TAP_POSITIONALLY_PREFERRED: + decide_tap_positionally_preferred(hold_tap, decision_moment, other_key_down_pos); } if (hold_tap->status == STATUS_UNDECIDED) {