summaryrefslogtreecommitdiff
path: root/gtk2_ardour/region_selection.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-02-26 00:58:35 +0000
committerDavid Robillard <d@drobilla.net>2009-02-26 00:58:35 +0000
commit03536cd399131e3fec54c95ae5ac6f11dca05aef (patch)
treece73dfb9f1258c79f0e985840a12842154683479 /gtk2_ardour/region_selection.cc
parent3bc71af0ca89354670243e600c70374bfb224c6d (diff)
Fix a bunch of warnings.
Clean up. git-svn-id: svn://localhost/ardour2/branches/3.0@4668 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/region_selection.cc')
-rw-r--r--gtk2_ardour/region_selection.cc41
1 files changed, 11 insertions, 30 deletions
diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc
index 76dfe33107..ac8a783a41 100644
--- a/gtk2_ardour/region_selection.cc
+++ b/gtk2_ardour/region_selection.cc
@@ -28,10 +28,8 @@ using namespace ARDOUR;
using namespace PBD;
using namespace sigc;
-/**
- * Construct an empty RegionSelection.
+/** Construct an empty RegionSelection.
*/
-
RegionSelection::RegionSelection ()
{
RegionView::RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
@@ -40,12 +38,12 @@ RegionSelection::RegionSelection ()
_current_end = 0;
}
-/**
- * Copy constructor.
+/** Copy constructor.
* @param other RegionSelection to copy.
*/
-
RegionSelection::RegionSelection (const RegionSelection& other)
+ : std::list<RegionView*>()
+ , sigc::trackable(other)
{
RegionView::RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
@@ -56,11 +54,9 @@ RegionSelection::RegionSelection (const RegionSelection& other)
_current_end = other._current_end;
}
-/**
- * operator= to set a RegionSelection to be the same as another.
+/** operator= to set a RegionSelection to be the same as another.
* @param other Other RegionSelection.
*/
-
RegionSelection&
RegionSelection::operator= (const RegionSelection& other)
{
@@ -79,10 +75,8 @@ RegionSelection::operator= (const RegionSelection& other)
return *this;
}
-/**
- * Empty this RegionSelection.
+/** Empty this RegionSelection.
*/
-
void
RegionSelection::clear_all()
{
@@ -96,18 +90,15 @@ RegionSelection::clear_all()
* @param rv RegionView.
* @return true if this selection contains rv.
*/
-
bool RegionSelection::contains (RegionView* rv) const
{
return find (begin(), end(), rv) != end();
}
-/**
- * Add a region to the selection.
+/** Add a region to the selection.
* @param rv Region to add.
* @return false if we already had the region, otherwise true.
*/
-
bool
RegionSelection::add (RegionView* rv)
{
@@ -133,23 +124,19 @@ RegionSelection::add (RegionView* rv)
return true;
}
-/**
- * Remove a region from the selection.
+/** Remove a region from the selection.
* @param rv Region to remove.
*/
-
void
RegionSelection::remove_it (RegionView *rv)
{
remove (rv);
}
-/**
- * Remove a region from the selection.
+/** Remove a region from the selection.
* @param rv Region to remove.
* @return true if the region was in the selection, false if not.
*/
-
bool
RegionSelection::remove (RegionView* rv)
{
@@ -213,11 +200,9 @@ RegionSelection::remove (RegionView* rv)
return false;
}
-/**
- * Add a region to the list sorted by layer.
+/** Add a region to the list sorted by layer.
* @param rv Region to add.
*/
-
void
RegionSelection::add_to_layer (RegionView * rv)
{
@@ -248,7 +233,6 @@ struct RegionSortByTime {
* @param foo List which will be filled with the selection's regions
* sorted by position.
*/
-
void
RegionSelection::by_position (list<RegionView*>& foo) const
{
@@ -281,7 +265,6 @@ struct RegionSortByTrack {
* @param List which will be filled with the selection's regions
* sorted by track and position.
*/
-
void
RegionSelection::by_track (list<RegionView*>& foo) const
{
@@ -299,7 +282,6 @@ RegionSelection::by_track (list<RegionView*>& foo) const
/**
* @param Sort the selection by position and track.
*/
-
void
RegionSelection::sort_by_position_and_track ()
{
@@ -311,7 +293,6 @@ RegionSelection::sort_by_position_and_track ()
* @param tv Track.
* @return true if any of the selection's regions are on tv.
*/
-
bool
RegionSelection::involves (const TimeAxisView& tv) const
{
@@ -322,4 +303,4 @@ RegionSelection::involves (const TimeAxisView& tv) const
}
return false;
}
-
+