refactor(hold-tap): improve switch statements
This commit is contained in:
parent
bd19a3f97f
commit
87b727d8c5
1 changed files with 6 additions and 3 deletions
|
@ -279,9 +279,10 @@ static inline const char *flavor_str(enum flavor flavor) {
|
|||
return "balanced";
|
||||
case FLAVOR_TAP_PREFERRED:
|
||||
return "tap-preferred";
|
||||
}
|
||||
default:
|
||||
return "UNKNOWN FLAVOR";
|
||||
}
|
||||
}
|
||||
|
||||
static inline const char *status_str(enum status status) {
|
||||
switch (status) {
|
||||
|
@ -293,9 +294,10 @@ static inline const char *status_str(enum status status) {
|
|||
return "hold-interrupt";
|
||||
case STATUS_TAP:
|
||||
return "tap";
|
||||
}
|
||||
default:
|
||||
return "UNKNOWN STATUS";
|
||||
}
|
||||
}
|
||||
|
||||
static inline const char *decision_moment_str(enum decision_moment decision_moment) {
|
||||
switch (decision_moment) {
|
||||
|
@ -309,9 +311,10 @@ 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";
|
||||
}
|
||||
}
|
||||
|
||||
static int press_binding(struct active_hold_tap *hold_tap) {
|
||||
struct zmk_behavior_binding_event event = {
|
||||
|
|
Loading…
Add table
Reference in a new issue