using namespace std;
+TrackSelection::TrackSelection (list<TimeAxisView*> const &t)
+ : list<TimeAxisView*> (t)
+{
+
+}
+
list<TimeAxisView*>
TrackSelection::add (list<TimeAxisView*> const & t)
{
list<TimeAxisView*> added;
for (TrackSelection::const_iterator i = t.begin(); i != t.end(); ++i) {
- if (find (begin(), end(), *i) == end()) {
+ if (!contains (*i)) {
added.push_back (*i);
push_back (*i);
}
return added;
}
+
+bool
+TrackSelection::contains (TimeAxisView const * t) const
+{
+ return find (begin(), end(), t) != end();
+}