mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
Correct formatting for if/else statements
This commit is contained in:
parent
24e4ba399c
commit
cbb0a33aa3
2 changed files with 15 additions and 30 deletions
|
|
@ -265,8 +265,7 @@ LaunchControlXL::track_button_by_number(uint8_t n, uint8_t first, uint8_t middle
|
|||
NNNoteButtonMap::iterator b;
|
||||
if ( n < 4) {
|
||||
b = nn_note_button_map.find (first + n);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
b = nn_note_button_map.find (middle + n - 4);
|
||||
}
|
||||
|
||||
|
|
@ -295,8 +294,7 @@ LaunchControlXL::button_track_focus(uint8_t n)
|
|||
|
||||
if ( stripable[n]->is_selected() ) {
|
||||
b->set_color(AmberFull);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
b->set_color(AmberLow);
|
||||
}
|
||||
write (b->state_msg());
|
||||
|
|
@ -343,8 +341,7 @@ LaunchControlXL::update_track_control_led(uint8_t n)
|
|||
case TrackMute:
|
||||
if (ac->get_value()) {
|
||||
b->set_color(AmberFull);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
b->set_color(AmberLow);
|
||||
}
|
||||
break;
|
||||
|
|
@ -353,12 +350,10 @@ LaunchControlXL::update_track_control_led(uint8_t n)
|
|||
if (ac && stripable[n] != master ) {
|
||||
if (ac->get_value()) {
|
||||
b->set_color(GreenFull);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
b->set_color(GreenLow);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
b->set_color(Off);
|
||||
}
|
||||
break;
|
||||
|
|
@ -367,12 +362,10 @@ LaunchControlXL::update_track_control_led(uint8_t n)
|
|||
if (ac) {
|
||||
if (ac->get_value()) {
|
||||
b->set_color(RedFull);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
b->set_color(RedLow);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -408,8 +408,7 @@ LaunchControlXL::handle_button_message(Button* button, MIDI::EventTwoBytes* ev)
|
|||
NoteButton* nb = id_note_button_map[*x];
|
||||
if (cb != 0) {
|
||||
cb->timeout_connection.disconnect();
|
||||
}
|
||||
else if (nb != 0) {
|
||||
} else if (nb != 0) {
|
||||
nb->timeout_connection.disconnect();
|
||||
}
|
||||
}
|
||||
|
|
@ -417,8 +416,7 @@ LaunchControlXL::handle_button_message(Button* button, MIDI::EventTwoBytes* ev)
|
|||
buttons_down.insert(button->id());
|
||||
DEBUG_TRACE(DEBUG::LaunchControlXL, string_compose("button pressed: %1\n", LaunchControlXL::button_name_by_id(button->id())));
|
||||
start_press_timeout(button, button->id());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
DEBUG_TRACE(DEBUG::LaunchControlXL, string_compose("button depressed: %1\n", LaunchControlXL::button_name_by_id(button->id())));
|
||||
buttons_down.erase(button->id());
|
||||
button->timeout_connection.disconnect();
|
||||
|
|
@ -429,12 +427,10 @@ LaunchControlXL::handle_button_message(Button* button, MIDI::EventTwoBytes* ev)
|
|||
if (c == consumed.end()) {
|
||||
if (ev->value == 0) {
|
||||
(this->*button->release_method)();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
(this->*button->press_method)();
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
DEBUG_TRACE(DEBUG::LaunchControlXL, "button was consumed, ignored\n");
|
||||
consumed.erase(c);
|
||||
}
|
||||
|
|
@ -452,11 +448,9 @@ LaunchControlXL::handle_knob_message (Knob* knob)
|
|||
|
||||
if (knob->id() < 8) { // sendA
|
||||
ac = stripable[chan]->trim_control();
|
||||
}
|
||||
else if (knob->id() >= 8 && knob->id() < 16) { // sendB
|
||||
} else if (knob->id() >= 8 && knob->id() < 16) { // sendB
|
||||
ac = stripable[chan]->pan_width_control();
|
||||
}
|
||||
else if (knob->id() >= 16 && knob->id() < 24) { // pan
|
||||
} else if (knob->id() >= 16 && knob->id() < 24) { // pan
|
||||
ac = stripable[chan]->pan_azimuth_control();
|
||||
}
|
||||
|
||||
|
|
@ -496,14 +490,12 @@ LaunchControlXL::handle_midi_controller_message (MIDI::Parser& parser, MIDI::Eve
|
|||
if (b != cc_controller_button_map.end()) {
|
||||
Button* button = b->second;
|
||||
handle_button_message(button, ev);
|
||||
}
|
||||
else if (f != cc_fader_map.end()) {
|
||||
} else if (f != cc_fader_map.end()) {
|
||||
Fader* fader = f->second;
|
||||
fader->set_value(ev->value);
|
||||
handle_fader_message(fader);
|
||||
|
||||
}
|
||||
else if (k != cc_knob_map.end()) {
|
||||
} else if (k != cc_knob_map.end()) {
|
||||
Knob* knob = k->second;
|
||||
knob->set_value(ev->value);
|
||||
handle_knob_message(knob);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue