diff options
author | David Robillard <d@drobilla.net> | 2015-02-19 15:20:19 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-02-19 18:38:30 -0500 |
commit | 6a033a093b0ff48691352b98dc89ef20c557a4e8 (patch) | |
tree | 704e4b7fd5ced2fe383e496bc84018c307e6e834 | |
parent | 76f6ff178e24a9882f7f455c4cf4039e44bfe442 (diff) |
Remove unused ifdef gunk.
-rw-r--r-- | libs/evoral/src/Sequence.cpp | 75 |
1 files changed, 26 insertions, 49 deletions
diff --git a/libs/evoral/src/Sequence.cpp b/libs/evoral/src/Sequence.cpp index 10b7e31b79..1b5abe8ce9 100644 --- a/libs/evoral/src/Sequence.cpp +++ b/libs/evoral/src/Sequence.cpp @@ -624,39 +624,33 @@ Sequence<Time>::end_write (StuckNoteOption option, Time when) DEBUG_TRACE (DEBUG::Sequence, string_compose ("%1 : end_write (%2 notes) delete stuck option %3 @ %4\n", this, _notes.size(), option, when)); - #ifdef PERCUSSIVE_IGNORE_NOTE_OFFS - if (!_percussive) { - #endif - for (typename Notes::iterator n = _notes.begin(); n != _notes.end() ;) { - typename Notes::iterator next = n; - ++next; - - if (!(*n)->length()) { - switch (option) { - case Relax: - break; - case DeleteStuckNotes: - cerr << "WARNING: Stuck note lost: " << (*n)->note() << endl; - _notes.erase(n); - break; - case ResolveStuckNotes: - if (when <= (*n)->time()) { - cerr << "WARNING: Stuck note resolution - end time @ " - << when << " is before note on: " << (**n) << endl; - _notes.erase (*n); - } else { - (*n)->set_length (when - (*n)->time()); - cerr << "WARNING: resolved note-on with no note-off to generate " << (**n) << endl; - } - break; + for (typename Notes::iterator n = _notes.begin(); n != _notes.end() ;) { + typename Notes::iterator next = n; + ++next; + + if (!(*n)->length()) { + switch (option) { + case Relax: + break; + case DeleteStuckNotes: + cerr << "WARNING: Stuck note lost: " << (*n)->note() << endl; + _notes.erase(n); + break; + case ResolveStuckNotes: + if (when <= (*n)->time()) { + cerr << "WARNING: Stuck note resolution - end time @ " + << when << " is before note on: " << (**n) << endl; + _notes.erase (*n); + } else { + (*n)->set_length (when - (*n)->time()); + cerr << "WARNING: resolved note-on with no note-off to generate " << (**n) << endl; } + break; } - - n = next; } - #ifdef PERCUSSIVE_IGNORE_NOTE_OFFS + + n = next; } - #endif for (int i = 0; i < 16; ++i) { _write_notes[i].clear(); @@ -971,19 +965,9 @@ Sequence<Time>::append_note_on_unlocked (NotePtr note, event_id_t evid) add_note_unlocked (note); - #ifdef PERCUSSIVE_IGNORE_NOTE_OFFS - if (!_percussive) { - #endif - - DEBUG_TRACE (DEBUG::Sequence, string_compose ("Sustained: Appending active note on %1 channel %2\n", - (unsigned)(uint8_t)note->note(), note->channel())); - _write_notes[note->channel()].insert (note); - - #ifdef PERCUSSIVE_IGNORE_NOTE_OFFS - } else { - DEBUG_TRACE(DEBUG::Sequence, "Percussive: NOT appending active note on\n"); - } - #endif + DEBUG_TRACE (DEBUG::Sequence, string_compose ("Appending active note on %1 channel %2\n", + (unsigned)(uint8_t)note->note(), note->channel())); + _write_notes[note->channel()].insert (note); } @@ -1007,13 +991,6 @@ Sequence<Time>::append_note_off_unlocked (NotePtr note) _edited = true; -#ifdef PERCUSSIVE_IGNORE_NOTE_OFFS - if (_percussive) { - DEBUG_TRACE(DEBUG::Sequence, "Sequence Ignoring note off (percussive mode)\n"); - return; - } -#endif - bool resolved = false; /* _write_notes is sorted earliest-latest, so this will find the first matching note (FIFO) that |