Remove dead/annoying/unsafe code

Note the old Note::operator= was unsafe, since it made shallow copies of the on
and off events, which results in a double delete of events when the notes are
destructed.
This commit is contained in:
David Robillard 2016-12-04 13:20:15 -05:00
parent 11464bfb18
commit 7d2ed46b63
6 changed files with 2 additions and 51 deletions

View file

@ -92,24 +92,6 @@ Note<Time>::set_id (event_id_t id)
_off_event.set_id (id);
}
template<typename Time>
const Note<Time>&
Note<Time>::operator=(const Note<Time>& other)
{
_on_event = other._on_event;
_off_event = other._off_event;
assert(time() == other.time());
assert(end_time() == other.end_time());
assert(length() == other.length());
assert(note() == other.note());
assert(velocity() == other.velocity());
assert(_on_event.channel() == _off_event.channel());
assert(channel() == other.channel());
return *this;
}
template class Note<Evoral::Beats>;
} // namespace Evoral