[FR] Add move constructor and move assignment to MidiFile

midi

#1

juce_MidiFile.h:

    /** Move constructor */
    MidiFile (MidiFile&& other);

    /** Move assignment operator */
    MidiFile& operator= (MidiFile&& other);

juce_MidiFile.cpp:

MidiFile::MidiFile (MidiFile&& other)
    : tracks (static_cast<OwnedArray<MidiMessageSequence>&&> (other.tracks)),
      timeFormat (other.timeFormat)
{
}

MidiFile& MidiFile::operator= (MidiFile&& other)
{
    timeFormat = other.timeFormat;
    tracks = static_cast<OwnedArray<MidiMessageSequence>&&> (other.tracks);

    return *this;
}

#2

Tangentially, various MIDI classes might benefit from being marked as final. :slight_smile:


#3

Yep, good request, ta!