chore: Allow copying Messages
This is ground work for the `map` Thru function in PR #232.
This commit is contained in:
parent
08f6f53d12
commit
2ae9d9e509
|
|
@ -54,6 +54,20 @@ struct Message
|
|||
memset(sysexArray, 0, sSysExMaxSize * sizeof(DataByte));
|
||||
}
|
||||
|
||||
inline Message(const Message& inOther)
|
||||
: channel(inOther.channel)
|
||||
, type(inOther.type)
|
||||
, data1(inOther.data1)
|
||||
, data2(inOther.data2)
|
||||
, valid(inOther.valid)
|
||||
, length(inOther.length)
|
||||
{
|
||||
if (type == midi::SystemExclusive)
|
||||
{
|
||||
memcpy(sysexArray, inOther.sysexArray, sSysExMaxSize * sizeof(DataByte));
|
||||
}
|
||||
}
|
||||
|
||||
/*! The maximum size for the System Exclusive array.
|
||||
*/
|
||||
static const unsigned sSysExMaxSize = SysExMaxSize;
|
||||
|
|
|
|||
Loading…
Reference in New Issue