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

@ -137,7 +137,7 @@ PortGroup::add_bundle_internal (std::shared_ptr<Bundle> b, std::shared_ptr<IO> i
}
BundleRecord* br = new BundleRecord (b, io, colour, has_colour);
b->Changed.connect (br->changed_connection, invalidator (*this), boost::bind (&PortGroup::bundle_changed, this, _1), gui_context());
b->Changed.connect (br->changed_connection, invalidator (*this), std::bind (&PortGroup::bundle_changed, this, _1), gui_context());
_bundles.push_back (br);
Changed ();
@ -400,7 +400,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
#endif
RouteIOs rb (r, io);
r->foreach_processor (boost::bind (&PortGroupList::maybe_add_processor_to_list, this, _1, &rb.ios, inputs, used_io));
r->foreach_processor (std::bind (&PortGroupList::maybe_add_processor_to_list, this, _1, &rb.ios, inputs, used_io));
route_ios.push_back (rb);
}
@ -914,8 +914,8 @@ PortGroupList::add_group (std::shared_ptr<PortGroup> g)
{
_groups.push_back (g);
g->Changed.connect (_changed_connections, invalidator (*this), boost::bind (&PortGroupList::emit_changed, this), gui_context());
g->BundleChanged.connect (_bundle_changed_connections, invalidator (*this), boost::bind (&PortGroupList::emit_bundle_changed, this, _1), gui_context());
g->Changed.connect (_changed_connections, invalidator (*this), std::bind (&PortGroupList::emit_changed, this), gui_context());
g->BundleChanged.connect (_bundle_changed_connections, invalidator (*this), std::bind (&PortGroupList::emit_bundle_changed, this, _1), gui_context());
emit_changed ();
}