Fix deadlock and potential race condition when editing MIDI.
[ardour.git] / libs / evoral / evoral / TimeConverter.hpp
index 3f434d9dd7f2f4f20316bfafa67659caaa150d58..eabe0e47621894950d45ef410c3d2426492fd029 100644 (file)
@@ -38,6 +38,15 @@ public:
        virtual A from(B b) const = 0;
 };
 
+
+/** A stub TimeConverter that simple statically casts between types. */
+template<typename A, typename B>
+class IdentityConverter : public TimeConverter<A,B> {
+       B to(A a)   const { return static_cast<B>(a); }
+       A from(B b) const { return static_cast<A>(b); }
+};
+
+
 } // namespace Evoral
 
 #endif // EVORAL_TIME_CONVERTER_HPP