Cleanup previous commit.
[ardour.git] / libs / ardour / midi_playlist.cc
index d8b07d33428f198a9c1515558c0aaa36ddd9e202..a1fb01a7bb859702f2a6488c645653de77c906d1 100644 (file)
@@ -80,12 +80,6 @@ MidiPlaylist::~MidiPlaylist ()
        notify_callbacks ();
 }
 
-struct RegionSortByLayer {
-    bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
-           return a->layer() < b->layer();
-    }
-};
-
 template<typename Time>
 struct EventsSortByTime {
     bool operator() (Evoral::Event<Time>* a, Evoral::Event<Time>* b) {
@@ -125,7 +119,7 @@ MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t d
                                   on, and remove it from the list we are keeping
                                   around, because we don't need it anymore.
 
-                                  if the end of the region (where we want to theoretically resolve notes) 
+                                  if the end of the region (where we want to theoretically resolve notes)
                                   is outside the current read range, then just do it at the start
                                   of this read range.
                                */
@@ -134,7 +128,7 @@ MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t d
                                if (resolve_at >= end) {
                                        resolve_at = start;
                                }
-                               
+
                                tracker_info.push_back (TrackerInfo (t->second, resolve_at));
                                DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("time to resolve & remove tracker for %1 @ %2\n", (*i)->name(), resolve_at));
                                note_cnt += (t->second->on());
@@ -212,9 +206,6 @@ MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t d
                }
 #endif
 
-               RegionSortByLayer layer_cmp;
-               sort(regs.begin(), regs.end(), layer_cmp);
-
                DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("for %1 .. %2 we have %3 to consider\n", start, start+dur-1, regs.size()));
 
                for (vector<boost::shared_ptr<Region> >::iterator i = regs.begin(); i != regs.end(); ++i) {