mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence and ExportPortChannel.
This commit is contained in:
parent
90c5524e7b
commit
b35518e212
819 changed files with 9736 additions and 9709 deletions
|
|
@ -73,19 +73,19 @@ AutomationStreamView::~AutomationStreamView ()
|
|||
|
||||
|
||||
RegionView*
|
||||
AutomationStreamView::add_region_view_internal (boost::shared_ptr<Region> region, bool /*wait_for_data*/, bool /*recording*/)
|
||||
AutomationStreamView::add_region_view_internal (std::shared_ptr<Region> region, bool /*wait_for_data*/, bool /*recording*/)
|
||||
{
|
||||
if (!region) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const boost::shared_ptr<AutomationControl> control = boost::dynamic_pointer_cast<AutomationControl> (
|
||||
const std::shared_ptr<AutomationControl> control = std::dynamic_pointer_cast<AutomationControl> (
|
||||
region->control (_automation_view.parameter(), true)
|
||||
);
|
||||
|
||||
boost::shared_ptr<AutomationList> list;
|
||||
std::shared_ptr<AutomationList> list;
|
||||
if (control) {
|
||||
list = boost::dynamic_pointer_cast<AutomationList>(control->list());
|
||||
list = std::dynamic_pointer_cast<AutomationList>(control->list());
|
||||
if (control->list() && !list) {
|
||||
error << _("unable to display automation region for control without list") << endmsg;
|
||||
return 0;
|
||||
|
|
@ -125,10 +125,10 @@ AutomationStreamView::add_region_view_internal (boost::shared_ptr<Region> region
|
|||
display_region (region_view);
|
||||
|
||||
/* catch regionview going away */
|
||||
region->DropReferences.connect (*this, invalidator (*this), boost::bind (&AutomationStreamView::remove_region_view, this, boost::weak_ptr<Region>(region)), gui_context());
|
||||
region->DropReferences.connect (*this, invalidator (*this), boost::bind (&AutomationStreamView::remove_region_view, this, std::weak_ptr<Region>(region)), gui_context());
|
||||
|
||||
/* setup automation state for this region */
|
||||
boost::shared_ptr<AutomationLine> line = region_view->line ();
|
||||
std::shared_ptr<AutomationLine> line = region_view->line ();
|
||||
if (line && line->the_list()) {
|
||||
line->the_list()->set_automation_state (automation_state ());
|
||||
}
|
||||
|
|
@ -152,9 +152,9 @@ AutomationStreamView::set_automation_state (AutoState state)
|
|||
if (region_views.empty()) {
|
||||
_pending_automation_state = state;
|
||||
} else {
|
||||
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
|
||||
list<std::shared_ptr<AutomationLine> > lines = get_lines ();
|
||||
|
||||
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
|
||||
for (list<std::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
|
||||
if ((*i)->the_list()) {
|
||||
(*i)->the_list()->set_automation_state (state);
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ AutomationStreamView::automation_state () const
|
|||
return _pending_automation_state;
|
||||
}
|
||||
|
||||
boost::shared_ptr<AutomationLine> line = ((AutomationRegionView*) region_views.front())->line ();
|
||||
std::shared_ptr<AutomationLine> line = ((AutomationRegionView*) region_views.front())->line ();
|
||||
if (!line || !line->the_list()) {
|
||||
return Off;
|
||||
}
|
||||
|
|
@ -218,9 +218,9 @@ AutomationStreamView::automation_state () const
|
|||
bool
|
||||
AutomationStreamView::has_automation () const
|
||||
{
|
||||
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
|
||||
list<std::shared_ptr<AutomationLine> > lines = get_lines ();
|
||||
|
||||
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
|
||||
for (list<std::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
|
||||
if ((*i)->npoints() > 0) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -235,9 +235,9 @@ AutomationStreamView::has_automation () const
|
|||
void
|
||||
AutomationStreamView::set_interpolation (AutomationList::InterpolationStyle s)
|
||||
{
|
||||
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
|
||||
list<std::shared_ptr<AutomationLine> > lines = get_lines ();
|
||||
|
||||
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
|
||||
for (list<std::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
|
||||
(*i)->the_list()->set_interpolation (s);
|
||||
}
|
||||
}
|
||||
|
|
@ -260,9 +260,9 @@ AutomationStreamView::interpolation () const
|
|||
void
|
||||
AutomationStreamView::clear ()
|
||||
{
|
||||
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
|
||||
list<std::shared_ptr<AutomationLine> > lines = get_lines ();
|
||||
|
||||
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
|
||||
for (list<std::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
|
||||
(*i)->clear ();
|
||||
}
|
||||
}
|
||||
|
|
@ -288,17 +288,17 @@ AutomationStreamView::get_selectables (timepos_t const & start, timepos_t const
|
|||
void
|
||||
AutomationStreamView::set_selected_points (PointSelection& ps)
|
||||
{
|
||||
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
|
||||
list<std::shared_ptr<AutomationLine> > lines = get_lines ();
|
||||
|
||||
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
|
||||
for (list<std::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
|
||||
(*i)->set_selected_points (ps);
|
||||
}
|
||||
}
|
||||
|
||||
list<boost::shared_ptr<AutomationLine> >
|
||||
list<std::shared_ptr<AutomationLine> >
|
||||
AutomationStreamView::get_lines () const
|
||||
{
|
||||
list<boost::shared_ptr<AutomationLine> > lines;
|
||||
list<std::shared_ptr<AutomationLine> > lines;
|
||||
|
||||
for (list<RegionView*>::const_iterator i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
AutomationRegionView* arv = dynamic_cast<AutomationRegionView*> (*i);
|
||||
|
|
@ -314,7 +314,7 @@ bool
|
|||
AutomationStreamView::paste (timepos_t const & pos,
|
||||
unsigned paste_count,
|
||||
float times,
|
||||
boost::shared_ptr<ARDOUR::AutomationList> alist)
|
||||
std::shared_ptr<ARDOUR::AutomationList> alist)
|
||||
{
|
||||
/* XXX: not sure how best to pick this; for now, just use the last region which starts before pos */
|
||||
|
||||
|
|
@ -333,7 +333,7 @@ AutomationStreamView::paste (timepos_t const & pos,
|
|||
prev = i;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Region> r = (*prev)->region ();
|
||||
std::shared_ptr<Region> r = (*prev)->region ();
|
||||
|
||||
/* If *prev doesn't cover pos, it's no good */
|
||||
if (r->position() > pos || ((r->position() + r->length()) < pos)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue