Skip to content

Commit

Permalink
refactor(hold-tap): improve switch statements
Browse files Browse the repository at this point in the history
  • Loading branch information
okke-formsma authored and petejohanson committed Feb 24, 2021
1 parent 9c4c266 commit 62ae157
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/src/behaviors/behavior_hold_tap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 62ae157

Please sign in to comment.