AM_MIDI2.0Lib
AM_MIDI2.0Lib copied to clipboard
Factor out the common fields in the UMP processor types.
Following the suggestion by @dhjdhj in https://github.com/midi2-dev/AM_MIDI2.0Lib/discussions/3, I thought I'd have a stab at the change!
Created a umpCommon struct which contains the fields that are common to umpCVM, umpGeneric, and umpData. There was a suggestion that inheritance could be used in this situation, but I've gone with the "prefer aggregation to inheritance" maxim and added a "common" field instead!
I replaced the default ctors of these types with direct member initialization. This should be a no-op from the POV of the generated code with the exception that I've initialized the umpData data and dataLength fields to nullptr and 0 respectively for safety.