mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-16 18:36:03 +01:00
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:
parent
11464bfb18
commit
7d2ed46b63
6 changed files with 2 additions and 51 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue