Reduce reliance on boost - the hard part

the rest from `tools/convert_boost.sh`.

* replace boost::function, boost::bind with std::function and std::bind.

This required some manual fixes, notably std::placeholders,
some static_casts<>, and boost::function::clear -> = {}.
This commit is contained in:
Robin Gareus 2024-10-19 01:51:44 +02:00
parent ff95d81612
commit 74c4ca3e52
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
392 changed files with 2264 additions and 2282 deletions

View file

@ -134,7 +134,7 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
level_meter = new LevelMeterHBox(_session);
level_meter->ButtonPress.connect_same_thread (_level_meter_connection, boost::bind (&GainMeterBase::level_meter_button_press, this, _1));
level_meter->ButtonPress.connect_same_thread (_level_meter_connection, std::bind (&GainMeterBase::level_meter_button_press, this, _1));
meter_metric_area.signal_button_press_event().connect (sigc::mem_fun (*this, &GainMeterBase::level_meter_button_press));
meter_metric_area.add_events (Gdk::BUTTON_PRESS_MASK);
@ -258,7 +258,7 @@ GainMeterBase::set_controls (std::shared_ptr<Stripable> s,
if (amp) {
amp->ConfigurationChanged.connect (
model_connections, invalidator (*this), boost::bind (&GainMeterBase::setup_gain_adjustment, this), gui_context ()
model_connections, invalidator (*this), std::bind (&GainMeterBase::setup_gain_adjustment, this), gui_context ()
);
}
@ -284,12 +284,12 @@ GainMeterBase::set_controls (std::shared_ptr<Stripable> s,
connections.push_back (gain_automation_state_button.signal_button_press_event().connect (sigc::mem_fun(*this, &GainMeterBase::gain_automation_state_button_event), false));
connections.push_back (ChangeGainAutomationState.connect (sigc::mem_fun(*this, &GainMeterBase::set_gain_astate)));
_control->alist()->automation_state_changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeter::gain_automation_state_changed, this), gui_context());
_control->alist()->automation_state_changed.connect (model_connections, invalidator (*this), std::bind (&GainMeter::gain_automation_state_changed, this), gui_context());
gain_automation_state_changed ();
}
_control->Changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeterBase::gain_changed, this), gui_context());
_control->Changed.connect (model_connections, invalidator (*this), std::bind (&GainMeterBase::gain_changed, this), gui_context());
gain_changed ();
show_gain ();
@ -743,7 +743,7 @@ GainMeterBase::set_route_group_meter_point (Route& route, MeterPoint mp)
RouteGroup* route_group;
if ((route_group = route.route_group ()) != 0) {
route_group->foreach_route (boost::bind (&Route::set_meter_point, _1, mp));
route_group->foreach_route (std::bind (&Route::set_meter_point, _1, mp));
} else {
route.set_meter_point (mp);
}
@ -1045,10 +1045,10 @@ GainMeter::set_controls (std::shared_ptr<Stripable> s,
if (_meter) {
_meter->ConfigurationChanged.connect (
model_connections, invalidator (*this), boost::bind (&GainMeter::meter_configuration_changed, this, _1), gui_context()
model_connections, invalidator (*this), std::bind (&GainMeter::meter_configuration_changed, this, _1), gui_context()
);
_meter->MeterTypeChanged.connect (
model_connections, invalidator (*this), boost::bind (&GainMeter::redraw_metrics, this), gui_context()
model_connections, invalidator (*this), std::bind (&GainMeter::redraw_metrics, this), gui_context()
);
meter_configuration_changed (_meter->input_streams ());
@ -1056,7 +1056,7 @@ GainMeter::set_controls (std::shared_ptr<Stripable> s,
if (route()) {
route()->active_changed.connect (model_connections, invalidator (*this), boost::bind (&GainMeter::route_active_changed, this), gui_context ());
route()->active_changed.connect (model_connections, invalidator (*this), std::bind (&GainMeter::route_active_changed, this), gui_context ());
}
hbox.pack_start (meter_hbox, true, true);