Improve performance by iterating from the tail when removing notes.
This commit is contained in:
parent
9157f847ca
commit
db002130c9
|
|
@ -197,9 +197,9 @@ inline void MidiNoteList<Size>::add(const MidiNote& inNote)
|
|||
template<byte Size>
|
||||
inline void MidiNoteList<Size>::remove(byte inPitch)
|
||||
{
|
||||
if (mHead != 0)
|
||||
if (mTail != 0)
|
||||
{
|
||||
for (Cell* it = mHead; it != 0; it = it->next)
|
||||
for (Cell* it = mTail; it != 0; it = it->prev)
|
||||
{
|
||||
if (it->note.pitch == inPitch)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue