diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-08-25 01:07:15 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-08-25 01:07:15 +0000 |
commit | ce234f363e95c38fc92728e520bf5ba240a89aa7 (patch) | |
tree | 96ce8c4734bdd564ec1f2ad0c36bc32f0b108204 /gtk2_ardour/region_selection.cc | |
parent | 7e95f29ce95edf01d6d451f96fae03f3d3451ff8 (diff) |
use shared_ptr<> for all region handling
git-svn-id: svn://localhost/ardour2/trunk@852 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/region_selection.cc')
-rw-r--r-- | gtk2_ardour/region_selection.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc index f8c9f384a9..7f7148d2b1 100644 --- a/gtk2_ardour/region_selection.cc +++ b/gtk2_ardour/region_selection.cc @@ -102,12 +102,12 @@ RegionSelection::add (RegionView* rv, bool dosort) rv->RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it)); - if (rv->region().first_frame() < _current_start || empty()) { - _current_start = rv->region().first_frame(); + if (rv->region()->first_frame() < _current_start || empty()) { + _current_start = rv->region()->first_frame(); } - if (rv->region().last_frame() > _current_end || empty()) { - _current_end = rv->region().last_frame(); + if (rv->region()->last_frame() > _current_end || empty()) { + _current_end = rv->region()->last_frame(); } insert (rv); @@ -142,17 +142,17 @@ RegionSelection::remove (RegionView* rv) } else { - Region& region ((*i)->region()); + boost::shared_ptr<Region> region ((*i)->region()); - if (region.first_frame() == _current_start) { + if (region->first_frame() == _current_start) { /* reset current start */ jack_nframes_t ref = max_frames; for (i = begin (); i != end(); ++i) { - if (region.first_frame() < ref) { - ref = region.first_frame(); + if (region->first_frame() < ref) { + ref = region->first_frame(); } } @@ -160,15 +160,15 @@ RegionSelection::remove (RegionView* rv) } - if (region.last_frame() == _current_end) { + if (region->last_frame() == _current_end) { /* reset current end */ jack_nframes_t ref = 0; for (i = begin (); i != end(); ++i) { - if (region.first_frame() > ref) { - ref = region.first_frame(); + if (region->first_frame() > ref) { + ref = region->first_frame(); } } @@ -191,7 +191,7 @@ RegionSelection::add_to_layer (RegionView * rv) for (i = _bylayer.begin(); i != _bylayer.end(); ++i) { - if (rv->region().layer() < (*i)->region().layer()) { + if (rv->region()->layer() < (*i)->region()->layer()) { _bylayer.insert(i, rv); return; } @@ -203,7 +203,7 @@ RegionSelection::add_to_layer (RegionView * rv) struct RegionSortByTime { bool operator() (const RegionView* a, const RegionView* b) { - return a->region().position() < b->region().position(); + return a->region()->position() < b->region()->position(); } }; |