use a map to find GhostEvents by a pointer to Note.
[ardour.git] / gtk2_ardour / ghostregion.h
index a46ab8fe111825ecc656312b160935aafc4fd4ea..75b55d0dbe47ea8b3b5d1b221e06ded6f05c32e9 100644 (file)
@@ -119,8 +119,9 @@ private:
        ArdourCanvas::Color _outline;
 
        MidiGhostRegion::GhostEvent* find_event (NoteBase*);
+       typedef Evoral::Note<Evoral::Beats> NoteType;
 
-       typedef std::list<MidiGhostRegion::GhostEvent*> EventList;
+       typedef std::map<boost::shared_ptr<NoteType>, MidiGhostRegion::GhostEvent* > EventList;
        EventList events;
        EventList::iterator _optimization_iterator;
 };