Fix sketchy casts.
[ardour.git] / libs / ardour / ardour / midi_model.h
index 6496fd169ac19ef18a670c739c534317ccf6d373..b099f575a16b3e6b761c705c2830542d0d4fd144 100644 (file)
@@ -165,6 +165,22 @@ public:
 
        boost::shared_ptr<Evoral::Note<TimeType> > find_note (boost::shared_ptr<Evoral::Note<TimeType> >);
 
+private:
+       struct WriteLockImpl : public AutomatableSequence<Evoral::MusicalTime>::WriteLockImpl {
+               WriteLockImpl(Glib::Mutex::Lock* source_lock, Glib::RWLock& s, Glib::Mutex& c)
+                       : AutomatableSequence<Evoral::MusicalTime>::WriteLockImpl(s, c)
+                       , source_lock(source_lock)
+               {}
+               ~WriteLockImpl() {
+                       delete source_lock;
+               }
+               Glib::Mutex::Lock* source_lock;
+       };
+
+public:
+       virtual WriteLock edit_lock();
+       virtual WriteLock write_lock();
+
 private:
        friend class DeltaCommand;