diff options
author | David Robillard <d@drobilla.net> | 2009-02-02 02:36:05 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-02-02 02:36:05 +0000 |
commit | 166ef64e3db4ab72b7b1e7455234e2b9ceddf6d8 (patch) | |
tree | 0f28067a301556c5c0a67091c691c82960db57c1 /libs/evoral/src/Note.cpp | |
parent | ead5dd45689be089d79a4a5daad88da737ca4cd9 (diff) |
Make (MIDI) event time stamp type a template parameter.
git-svn-id: svn://localhost/ardour2/branches/3.0@4473 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral/src/Note.cpp')
-rw-r--r-- | libs/evoral/src/Note.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libs/evoral/src/Note.cpp b/libs/evoral/src/Note.cpp index 02d65b5291..7ba6bd5d6b 100644 --- a/libs/evoral/src/Note.cpp +++ b/libs/evoral/src/Note.cpp @@ -21,7 +21,8 @@ namespace Evoral { -Note::Note(uint8_t chan, EventTime t, EventLength l, uint8_t n, uint8_t v) +template<typename T> +Note<T>::Note(uint8_t chan, T t, EventLength l, uint8_t n, uint8_t v) // FIXME: types? : _on_event(0xDE, t, 3, NULL, true) , _off_event(0xAD, t + l, 3, NULL, true) @@ -45,7 +46,8 @@ Note::Note(uint8_t chan, EventTime t, EventLength l, uint8_t n, uint8_t v) } -Note::Note(const Note& copy) +template<typename T> +Note<T>::Note(const Note<T>& copy) : _on_event(copy._on_event, true) , _off_event(copy._off_event, true) { @@ -71,13 +73,15 @@ Note::Note(const Note& copy) } -Note::~Note() +template<typename T> +Note<T>::~Note() { } -const Note& -Note::operator=(const Note& copy) +template<typename T> +const Note<T>& +Note<T>::operator=(const Note<T>& copy) { _on_event = copy._on_event; _off_event = copy._off_event; @@ -93,4 +97,6 @@ Note::operator=(const Note& copy) return *this; } +template class Note<double>; + } // namespace Evoral |