diff options
Diffstat (limited to 'libs/ardour/midi_region.cc')
-rw-r--r-- | libs/ardour/midi_region.cc | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index 6fbb2e8923..d78506c1fc 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -501,24 +501,22 @@ MidiRegion::master_source_names () } bool -MidiRegion::region_list_equivalent (const MidiRegion& other) const +MidiRegion::source_equivalent (const Region& o) const { - return size_equivalent (other) && source_equivalent (other) && _name == other._name; -} + const MidiRegion* other = dynamic_cast<const MidiRegion*>(&o); + if (!other) + return false; -bool -MidiRegion::source_equivalent (const MidiRegion& other) const -{ SourceList::const_iterator i; SourceList::const_iterator io; - for (i = sources.begin(), io = other.sources.begin(); i != sources.end() && io != other.sources.end(); ++i, ++io) { + for (i = sources.begin(), io = other->sources.begin(); i != sources.end() && io != other->sources.end(); ++i, ++io) { if ((*i)->id() != (*io)->id()) { return false; } } - for (i = master_sources.begin(), io = other.master_sources.begin(); i != master_sources.end() && io != other.master_sources.end(); ++i, ++io) { + for (i = master_sources.begin(), io = other->master_sources.begin(); i != master_sources.end() && io != other->master_sources.end(); ++i, ++io) { if ((*i)->id() != (*io)->id()) { return false; } @@ -527,27 +525,6 @@ MidiRegion::source_equivalent (const MidiRegion& other) const return true; } -bool -MidiRegion::overlap_equivalent (const MidiRegion& other) const -{ - return coverage (other.first_frame(), other.last_frame()) != OverlapNone; -} - -bool -MidiRegion::equivalent (const MidiRegion& other) const -{ - return _start == other._start && - _position == other._position && - _length == other._length; -} - -bool -MidiRegion::size_equivalent (const MidiRegion& other) const -{ - return _start == other._start && - _length == other._length; -} - #if 0 int MidiRegion::exportme (Session& session, AudioExportSpecification& spec) |