diff options
author | nick_m <mainsbridge@gmail.com> | 2015-05-24 01:53:34 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-05-24 01:53:34 +1000 |
commit | 92b69a17da49a314aa8b0693e0a1ccef925b9bf9 (patch) | |
tree | 60ab053f268525c34c29c9d1ff14520e100327a9 | |
parent | 9a55bcb04fc9af5e0425b7ef12c628cad9494433 (diff) |
Make Evoral::Event ids unique always.
- probably fixes a lot of cases where note ids are assumed to be
unique (they weren't for copies and some others).
- wrong branch, but it needs testing.
-rw-r--r-- | libs/evoral/src/Event.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/evoral/src/Event.cpp b/libs/evoral/src/Event.cpp index da31662951..45935ccf8d 100644 --- a/libs/evoral/src/Event.cpp +++ b/libs/evoral/src/Event.cpp @@ -86,7 +86,7 @@ Event<Timestamp>::Event(const Event& copy, bool owns_buf) , _nominal_time(copy._nominal_time) , _size(copy._size) , _buf(copy._buf) - , _id(copy.id()) + , _id (next_event_id ()) , _owns_buf(owns_buf) { if (owns_buf) { @@ -110,7 +110,7 @@ template<typename Timestamp> const Event<Timestamp>& Event<Timestamp>::operator=(const Event& copy) { - _id = copy.id(); // XXX is this right? do we want ID copy semantics? + _id = next_event_id (); _type = copy._type; _original_time = copy._original_time; _nominal_time = copy._nominal_time; |