collectNote makes copy assignment which should be reference assignment

• Jul 28, 2016 - 09:55
Reported version
3.0
Type
Functional
Severity
3
Status
closed
Project

The function collectNote in rendermidi.cpp contains the following line:

const NoteEvent e = nel[i];

I'd like to change this to the following:

const NoteEvent& e = nel[i];

Thus we e make an explict const ref, not a const copy. There is no need to copy as we won't change the original object.

The effect is less memory allocation and deallocation. It probably won't be measurable, but it's better coding practice.


Comments