diff options
author | Okke Formsma <okke@formsma.nl> | 2021-02-06 20:57:06 +0100 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2021-02-24 07:24:27 -0500 |
commit | 62ae157c0bbd85654cd098d058dc95b0de54171a (patch) | |
tree | 993d2193079d8aa86320272355dc6a186a227092 /app | |
parent | 9c4c266b17f6fec4866d65bec0889233845b6282 (diff) |
refactor(hold-tap): improve switch statements
Diffstat (limited to 'app')
-rw-r--r-- | app/src/behaviors/behavior_hold_tap.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index 798992b..06d22f4 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -278,8 +278,9 @@ static inline const char *flavor_str(enum flavor flavor) { return "balanced"; case FLAVOR_TAP_PREFERRED: return "tap-preferred"; + default: + return "UNKNOWN FLAVOR"; } - return "UNKNOWN FLAVOR"; } static inline const char *status_str(enum status status) { @@ -292,8 +293,9 @@ static inline const char *status_str(enum status status) { return "hold-interrupt"; case STATUS_TAP: return "tap"; + default: + return "UNKNOWN STATUS"; } - return "UNKNOWN STATUS"; } static inline const char *decision_moment_str(enum decision_moment decision_moment) { @@ -308,8 +310,9 @@ static inline const char *decision_moment_str(enum decision_moment decision_mome return "quick-tap"; case HT_TIMER_EVENT: return "timer"; + default: + return "UNKNOWN STATUS"; } - return "UNKNOWN STATUS"; } static int press_binding(struct active_hold_tap *hold_tap) { |