Skip to content

Commit

Permalink
fix: inline initialise
Browse files Browse the repository at this point in the history
  • Loading branch information
theol0403 authored and petejohanson committed Feb 20, 2024
1 parent 8b20874 commit c9c620d
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions app/src/behaviors/behavior_hold_tap.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,8 @@ static int press_hold_binding(struct active_hold_tap *hold_tap) {
.timestamp = hold_tap->timestamp,
};

struct zmk_behavior_binding binding = {0};
binding.behavior_dev = hold_tap->config->hold_behavior_dev;
binding.param1 = hold_tap->param_hold;
struct zmk_behavior_binding binding = {.behavior_dev = hold_tap->config->hold_behavior_dev,
.param1 = hold_tap->param_hold};
return behavior_keymap_binding_pressed(&binding, event);
}

Expand All @@ -408,9 +407,8 @@ static int press_tap_binding(struct active_hold_tap *hold_tap) {
.timestamp = hold_tap->timestamp,
};

struct zmk_behavior_binding binding = {0};
binding.behavior_dev = hold_tap->config->tap_behavior_dev;
binding.param1 = hold_tap->param_tap;
struct zmk_behavior_binding binding = {.behavior_dev = hold_tap->config->tap_behavior_dev,
.param1 = hold_tap->param_tap};
store_last_hold_tapped(hold_tap);
return behavior_keymap_binding_pressed(&binding, event);
}
Expand All @@ -421,9 +419,8 @@ static int release_hold_binding(struct active_hold_tap *hold_tap) {
.timestamp = hold_tap->timestamp,
};

struct zmk_behavior_binding binding = {0};
binding.behavior_dev = hold_tap->config->hold_behavior_dev;
binding.param1 = hold_tap->param_hold;
struct zmk_behavior_binding binding = {.behavior_dev = hold_tap->config->hold_behavior_dev,
.param1 = hold_tap->param_hold};
return behavior_keymap_binding_released(&binding, event);
}

Expand All @@ -433,9 +430,8 @@ static int release_tap_binding(struct active_hold_tap *hold_tap) {
.timestamp = hold_tap->timestamp,
};

struct zmk_behavior_binding binding = {0};
binding.behavior_dev = hold_tap->config->tap_behavior_dev;
binding.param1 = hold_tap->param_tap;
struct zmk_behavior_binding binding = {.behavior_dev = hold_tap->config->tap_behavior_dev,
.param1 = hold_tap->param_tap};
return behavior_keymap_binding_released(&binding, event);
}

Expand Down

0 comments on commit c9c620d

Please sign in to comment.